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: */
7:
8: namespace Nette\Application\UI;
9:
10: use Nette;
11:
12:
13: /**
14: * Component multiplier.
15: *
16: * @author David Grudl
17: */
18: class Multiplier extends PresenterComponent
19: {
20: /** @var Nette\Callback */
21: private $factory;
22:
23:
24: public function __construct($factory)
25: {
26: parent::__construct();
27: $this->factory = new Nette\Callback($factory);
28: }
29:
30:
31: protected function createComponent($name)
32: {
33: return $this->factory->invoke($name, $this);
34: }
35:
36: }
37: