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