class Compiler extends Object

DI container compiler.

Methods

__construct(ContainerBuilder $builder = NULL)

No description

addExtension($name, CompilerExtension $extension)

Add custom configurator extension.

array
getExtensions($type = NULL)

No description

setClassName($className)

No description

addConfig(array $config)

Adds new configuration.

loadConfig($file)

Adds new configuration from file.

array
getConfig()

Returns configuration.

addDependencies(array $files)

Adds a files to the list of dependencies.

array
getDependencies()

Returns the unique list of dependent files.

ClassType[]|string
compile(array $config = NULL, $className = NULL, $parentName = NULL)

No description

processParameters()

No description

processExtensions()

No description

processServices()

No description

generateCode($className, $parentName = NULL)

No description

static void
parseServices(ContainerBuilder $builder, array $config, $namespace = NULL)

Parses section 'services' from (unexpanded) configuration file.

static void
parseService(ServiceDefinition $definition, $config)

Parses single service from configuration file.

static array
filterArguments(array $args)

Removes ... and process constants recursively.

Details

at line 38
__construct(ContainerBuilder $builder = NULL)

No description

Parameters

ContainerBuilder $builder

at line 48
Compiler addExtension($name, CompilerExtension $extension)

Add custom configurator extension.

Parameters

$name
CompilerExtension $extension

Return Value

Compiler

at line 61
array getExtensions($type = NULL)

No description

Parameters

$type

Return Value

array

at line 72
ContainerBuilder getContainerBuilder()

No description

Return Value

ContainerBuilder

at line 81
Compiler setClassName($className)

No description

Parameters

$className

Return Value

Compiler

at line 92
Compiler addConfig(array $config)

Adds new configuration.

Parameters

array $config

Return Value

Compiler

at line 103
Compiler loadConfig($file)

Adds new configuration from file.

Parameters

$file

Return Value

Compiler

at line 116
array getConfig()

Returns configuration.

Return Value

array

at line 126
Compiler addDependencies(array $files)

Adds a files to the list of dependencies.

Parameters

array $files

Return Value

Compiler

at line 137
array getDependencies()

Returns the unique list of dependent files.

Return Value

array

at line 146
ClassType[]|string compile(array $config = NULL, $className = NULL, $parentName = NULL)

No description

Parameters

array $config
$className
$parentName

Return Value

ClassType[]|string

at line 160
processParameters()

internal  
 

No description

at line 169
processExtensions()

internal  
 

No description

at line 209
processServices()

internal  
 

No description

at line 216
generateCode($className, $parentName = NULL)

internal  
 

No description

Parameters

$className
$parentName

at line 249
static void parseServices(ContainerBuilder $builder, array $config, $namespace = NULL)

Parses section 'services' from (unexpanded) configuration file.

Parameters

ContainerBuilder $builder
array $config
$namespace

Return Value

void

at line 321
static void parseService(ServiceDefinition $definition, $config)

Parses single service from configuration file.

Parameters

ServiceDefinition $definition
$config

Return Value

void

at line 434
static array filterArguments(array $args)

Removes ... and process constants recursively.

Parameters

array $args

Return Value

array