Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
      • Traits
    • Reflection
    • Security
    • Tokenizer
    • Utils
  • Tracy
    • Bridges
      • Nette
  • none

Classes

  • ReflectionExtension
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
 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\Bridges\ReflectionDI;
 9: 
10: use Nette;
11: 
12: 
13: /**
14:  * Extension for Nette DI.
15:  */
16: class ReflectionExtension extends Nette\DI\CompilerExtension
17: {
18:     /** @var bool */
19:     private $debugMode;
20: 
21: 
22:     public function __construct($debugMode = false)
23:     {
24:         $this->debugMode = $debugMode;
25:     }
26: 
27: 
28:     public function afterCompile(Nette\PhpGenerator\ClassType $class)
29:     {
30:         $class->getMethod('initialize')
31:             ->addBody('Nette\Reflection\AnnotationsParser::setCacheStorage($this->getByType(Nette\Caching\IStorage::class));')
32:             ->addBody('Nette\Reflection\AnnotationsParser::$autoRefresh = ?;', [$this->debugMode]);
33:     }
34: }
35: 
Nette 2.4-20180918 API API documentation generated by ApiGen 2.8.0