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

  • Compiler
  • CompilerExtension
  • Container
  • ContainerBuilder
  • ContainerLoader
  • DependencyChecker
  • Helpers
  • PhpGenerator
  • PhpReflection
  • ServiceDefinition
  • Statement

Exceptions

  • MissingServiceException
  • ServiceCreationException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases

Class CompilerExtension

Configurator compiling extension.

Nette\DI\CompilerExtension uses Nette\SmartObject

Direct known subclasses

Nette\Bridges\ApplicationDI\ApplicationExtension, Nette\Bridges\ApplicationDI\LatteExtension, Nette\Bridges\SecurityDI\SecurityExtension, Nette\DI\Extensions\ConstantsExtension, Nette\DI\Extensions\DecoratorExtension, Nette\DI\Extensions\DIExtension, Nette\DI\Extensions\ExtensionsExtension, Nette\DI\Extensions\InjectExtension, Nette\DI\Extensions\PhpExtension, Tracy\Bridges\Nette\TracyExtension, Nette\Bridges\ApplicationDI\RoutingExtension, Nette\Bridges\CacheDI\CacheExtension, Nette\Bridges\DatabaseDI\DatabaseExtension, Nette\Bridges\FormsDI\FormsExtension, Nette\Bridges\HttpDI\HttpExtension, Nette\Bridges\HttpDI\SessionExtension, Nette\Bridges\MailDI\MailExtension, Nette\Bridges\ReflectionDI\ReflectionExtension
Abstract
Namespace: Nette\DI
Located at DI/CompilerExtension.php
Methods summary
public Nette\DI\CompilerExtension
# setCompiler( Nette\DI\Compiler $compiler, $name )

Returns

Nette\DI\CompilerExtension
static
public Nette\DI\CompilerExtension
# setConfig( array $config )

Returns

Nette\DI\CompilerExtension
static
public array
# getConfig( )

Returns extension configuration.

Returns extension configuration.

Returns

array
array
public array
# validateConfig( array $expected, array $config = null, $name = null )

Checks whether $config contains only $expected items and returns combined array.

Checks whether $config contains only $expected items and returns combined array.

Returns

array
array

Throws

Nette\InvalidStateException
Nette\InvalidStateException
public Nette\DI\ContainerBuilder
# getContainerBuilder( )

Returns

Nette\DI\ContainerBuilder
ContainerBuilder
public array
# loadFromFile( string $file )

Reads configuration from file.

Reads configuration from file.

Parameters

$file
name

Returns

array
array
public string
# prefix( string $id )

Prepend extension name to identifier or service name.

Prepend extension name to identifier or service name.

Parameters

$id

Returns

string
string
public
# loadConfiguration( )

Processes configuration data. Intended to be overridden by descendant.

Processes configuration data. Intended to be overridden by descendant.

public
# beforeCompile( )

Adjusts DI container before is compiled to PHP class. Intended to be overridden by descendant.

Adjusts DI container before is compiled to PHP class. Intended to be overridden by descendant.

public
# afterCompile( Nette\PhpGenerator\ClassType $class )

Adjusts DI container compiled to PHP class. Intended to be overridden by descendant.

Adjusts DI container compiled to PHP class. Intended to be overridden by descendant.

Methods used from Nette\SmartObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Properties summary
protected Nette\DI\Compiler $compiler
#
protected string $name
#
protected array $config
#[]
Nette 2.4-20180918 API API documentation generated by ApiGen 2.8.0