1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (http://nette.org)
5: * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
6: * @package Nette\Application\UI
7: */
8:
9:
10:
11: /**
12: * Component multiplier.
13: *
14: * @author David Grudl
15: * @package Nette\Application\UI
16: */
17: class Multiplier extends PresenterComponent
18: {
19: /** @var Callback */
20: private $factory;
21:
22:
23: public function __construct($factory)
24: {
25: parent::__construct();
26: $this->factory = new Callback($factory);
27: }
28:
29:
30: protected function createComponent($name)
31: {
32: return $this->factory->invoke($name, $this);
33: }
34:
35: }
36: