final class Helpers

internal  
 

The DI helpers.

Methods

static mixed
expand(mixed $var, array $params, bool|array $recursive = false)

Expands %placeholders%.

static mixed
escape(mixed $value)

Escapes '%' and '@'

static array
filterArguments(array $args)

Removes ... and process constants recursively.

static mixed
prefixServiceName(mixed $config, string $namespace)

Replaces @extension with real extension name in service definition.

static string|null
parseAnnotation(Reflector $ref, string $name)

Returns an annotation value.

static Type|null
static string
ensureClassType(Type|null $type, string $hint)

No description

static string
normalizeClass(string $type)

No description

static mixed
convertType(mixed $value, string $type)

Non data-loss type conversion.

Details

at line 34
static mixed expand(mixed $var, array $params, bool|array $recursive = false)

Expands %placeholders%.

Parameters

mixed $var
array $params
bool|array $recursive

Return Value

mixed

Exceptions

InvalidArgumentException

at line 114
static mixed escape(mixed $value)

Escapes '%' and '@'

Parameters

mixed $value

Return Value

mixed

at line 133
static array filterArguments(array $args)

Removes ... and process constants recursively.

Parameters

array $args

Return Value

array

at line 165
static mixed prefixServiceName(mixed $config, string $namespace)

Replaces @extension with real extension name in service definition.

Parameters

mixed $config
string $namespace

Return Value

mixed

at line 193
static string|null parseAnnotation(Reflector $ref, string $name)

Returns an annotation value.

Parameters

Reflector $ref
string $name

Return Value

string|null

at line 206
static Type|null getReturnTypeAnnotation(ReflectionFunctionAbstract $func)

No description

Parameters

ReflectionFunctionAbstract $func

Return Value

Type|null

at line 219
static string ensureClassType(Type|null $type, string $hint)

No description

Parameters

Type|null $type
string $hint

Return Value

string

at line 234
static string normalizeClass(string $type)

No description

Parameters

string $type

Return Value

string

at line 248
static mixed convertType(mixed $value, string $type)

Non data-loss type conversion.

Parameters

mixed $value
string $type

Return Value

mixed

Exceptions

InvalidStateException

Traits

Static class.