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

  • ConstantsExtension
  • ExtensionsExtension
  • PhpExtension
  • 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 (http://davidgrudl.com)
 6:  */
 7: 
 8: namespace Nette\DI\Extensions;
 9: 
10: use Nette;
11: 
12: 
13: /**
14:  * Enables registration of other extensions in $config file
15:  *
16:  * @author  Vojtech Dobes
17:  */
18: class ExtensionsExtension extends Nette\DI\CompilerExtension
19: {
20: 
21:     public function loadConfiguration()
22:     {
23:         foreach ($this->getConfig() as $name => $class) {
24:             if ($class instanceof \stdClass) {
25:                 $rc = Nette\Reflection\ClassType::from($class->value);
26:                 $this->compiler->addExtension($name, $rc->newInstanceArgs($class->attributes));
27:             } else {
28:                 $this->compiler->addExtension($name, new $class);
29:             }
30:         }
31:     }
32: 
33: }
34: 
Nette 2.2 API documentation generated by ApiGen 2.8.0