abstract class CompilerExtension extends Object

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 28
setCompiler(Compiler $compiler, $name)

No description

Parameters

Compiler $compiler
$name

at line 36
setConfig(array $config)

No description

Parameters

array $config

at line 47
array getConfig()

Returns extension configuration.

Return Value

array

at line 61
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 79
ContainerBuilder getContainerBuilder()

No description

Return Value

ContainerBuilder

at line 90
array loadFromFile($file)

Reads configuration from file.

Parameters

$file

Return Value

array

at line 104
string prefix($id)

Prepend extension name to identifier or service name.

Parameters

$id

Return Value

string

at line 114
void loadConfiguration()

Processes configuration data. Intended to be overridden by descendant.

Return Value

void

at line 123
void beforeCompile()

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

Return Value

void

at line 132
void afterCompile(ClassType $class)

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

Parameters

ClassType $class

Return Value

void