abstract class CompilerExtension

Configurator compiling extension.

Properties

protected Compiler $compiler
protected string $name
protected array $config

Methods

setCompiler(Compiler $compiler, $name)

No description

setConfig(array $config)

No description

array
getConfig()

Returns extension configuration.

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

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

array
loadFromFile($file)

Reads configuration from file.

string
prefix($id)

Prepend extension name to identifier or service name.

void
loadConfiguration()

Processes configuration data. Intended to be overridden by descendant.

void
beforeCompile()

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

void
afterCompile(ClassType $class)

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

Details

at line 33
CompilerExtension setCompiler(Compiler $compiler, $name)

No description

Parameters

Compiler $compiler
$name

Return Value

CompilerExtension

at line 44
CompilerExtension setConfig(array $config)

No description

Parameters

array $config

Return Value

CompilerExtension

at line 55
array getConfig()

Returns extension configuration.

Return Value

array

at line 69
array validateConfig(array $expected, array $config = null, $name = null)

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

Parameters

array $expected
array $config
$name

Return Value

array

Exceptions

InvalidStateException

at line 87
ContainerBuilder getContainerBuilder()

No description

Return Value

ContainerBuilder

at line 98
array loadFromFile($file)

Reads configuration from file.

Parameters

$file

Return Value

array

at line 112
string prefix($id)

Prepend extension name to identifier or service name.

Parameters

$id

Return Value

string

at line 122
void loadConfiguration()

Processes configuration data. Intended to be overridden by descendant.

Return Value

void

at line 131
void beforeCompile()

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

Return Value

void

at line 140
void afterCompile(ClassType $class)

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

Parameters

ClassType $class

Return Value

void

Traits

SmartObject