PHP Class Nette\DI\CompilerExtension

Inheritance: extends Nette\Object
显示文件 Open project: nette/di Class Usage Examples

Protected Properties

Property Type Description
$compiler Compiler
$config array
$name string

Public Methods

Method Description
afterCompile ( ClassType $class ) : void Adjusts DI container compiled to PHP class. Intended to be overridden by descendant.
beforeCompile ( ) : void Adjusts DI container before is compiled to PHP class. Intended to be overridden by descendant.
getConfig ( ) : array Returns extension configuration.
getContainerBuilder ( ) : ContainerBuilder
loadConfiguration ( ) : void Processes configuration data. Intended to be overridden by descendant.
loadFromFile ( $file ) : array Reads configuration from file.
prefix ( $id ) : string Prepend extension name to identifier or service name.
setCompiler ( Compiler $compiler, $name )
setConfig ( array $config )
validateConfig ( array $expected, array $config = NULL, $name = NULL ) : array Checks whether $config contains only $expected items and returns combined array.

Method Details

afterCompile() public method

Adjusts DI container compiled to PHP class. Intended to be overridden by descendant.
public afterCompile ( ClassType $class ) : void
$class Nette\PhpGenerator\ClassType
return void

beforeCompile() public method

Adjusts DI container before is compiled to PHP class. Intended to be overridden by descendant.
public beforeCompile ( ) : void
return void

getConfig() public method

Returns extension configuration.
public getConfig ( ) : array
return array

getContainerBuilder() public method

public getContainerBuilder ( ) : ContainerBuilder
return ContainerBuilder

loadConfiguration() public method

Processes configuration data. Intended to be overridden by descendant.
public loadConfiguration ( ) : void
return void

loadFromFile() public method

Reads configuration from file.
public loadFromFile ( $file ) : array
return array

prefix() public method

Prepend extension name to identifier or service name.
public prefix ( $id ) : string
return string

setCompiler() public method

public setCompiler ( Compiler $compiler, $name )
$compiler Compiler

setConfig() public method

public setConfig ( array $config )
$config array

validateConfig() public method

Checks whether $config contains only $expected items and returns combined array.
public validateConfig ( array $expected, array $config = NULL, $name = NULL ) : array
$expected array
$config array
return array

Property Details

$compiler protected_oe property

protected Compiler,Nette\DI $compiler
return Compiler

$config protected_oe property

protected array $config
return array

$name protected_oe property

protected string $name
return string