class ServicePluginConfigurator extends BaseConfiguratorReader

Class ServicePluginConfigurator - loads services from plugins

Properties

protected $tokens from BaseConfiguratorReader
protected $line from BaseConfiguratorReader

Methods

setCode(array $tokens, int $line = 0)

Sets the code to manipulate.

mixed
next()

Gets the next token.

mixed
peek(int $nb = 1)

Peeks the next token.

mixed
value(mixed $token)

Gets a value of a token

__construct(string $file)

Constructor.

Boolean
addResource(string $plugin)

Adds a service resource at the top of the existing ones.

Details

protected setCode(array $tokens, int $line = 0)

Sets the code to manipulate.

Parameters

array $tokens An array of PHP tokens
int $line The start line of the code

protected mixed next()

Gets the next token.

Return Value

mixed

protected mixed peek(int $nb = 1)

Peeks the next token.

Parameters

int $nb

Return Value

mixed

protected mixed value(mixed $token)

Gets a value of a token

Parameters

mixed $token

Return Value

mixed

at line 24
__construct(string $file)

Constructor.

Parameters

string $file The YAML routing file path

at line 38
Boolean addResource(string $plugin)

Adds a service resource at the top of the existing ones.

Parameters

string $plugin

Return Value

Boolean true if it worked, false otherwise

Exceptions

RuntimeException If bundle is already imported