Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationLatte
      • ApplicationTracy
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsLatte
      • Framework
      • HttpTracy
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Templating
    • Utils
  • NetteModule
  • none
  • Tracy

Classes

  • Control
  • Form
  • Multiplier
  • Presenter
  • PresenterComponent

Interfaces

  • IRenderable
  • ISignalReceiver
  • IStatePersistent
  • ITemplate
  • ITemplateFactory

Exceptions

  • BadSignalException
  • InvalidLinkException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage
 1: <?php
 2: 
 3: /**
 4:  * This file is part of the Nette Framework (https://nette.org)
 5:  * Copyright (c) 2004 David Grudl (https://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 callable */
21:     private $factory;
22: 
23: 
24:     /**
25:      * @param callable
26:      */
27:     public function __construct($factory)
28:     {
29:         parent::__construct();
30:         $this->factory = Nette\Utils\Callback::check($factory);
31:     }
32: 
33: 
34:     protected function createComponent($name)
35:     {
36:         return call_user_func($this->factory, $name, $this);
37:     }
38: 
39: }
40: 
Nette 2.2 API documentation generated by ApiGen 2.8.0