Documentation

Alias
in package

Table of Contents

DEFAULT_DEPRECATION_TEMPLATE  = 'The "%alias_id%" service alias is deprecated. You should stop using it, as it will be removed in the future.'
$deprecation  : mixed
$id  : mixed
$public  : mixed
__construct()  : mixed
__toString()  : string
Returns the Id of this alias.
getDeprecation()  : array<string|int, mixed>
getDeprecationMessage()  : string
isDeprecated()  : bool
isPrivate()  : bool
Whether this alias is private.
isPublic()  : bool
Checks if this DI Alias should be public or not.
setDeprecated()  : $this
Whether this alias is deprecated, that means it should not be referenced anymore.
setPrivate()  : $this
Sets if this Alias is private.
setPublic()  : $this
Sets if this Alias is public.

Constants

DEFAULT_DEPRECATION_TEMPLATE

private mixed DEFAULT_DEPRECATION_TEMPLATE = 'The "%alias_id%" service alias is deprecated. You should stop using it, as it will be removed in the future.'

Properties

$deprecation

private mixed $deprecation = []

$public

private mixed $public

Methods

__construct()

public __construct(string $id[, bool $public = false ]) : mixed
Parameters
$id : string
$public : bool = false
Return values
mixed

__toString()

Returns the Id of this alias.

public __toString() : string
Return values
string

getDeprecation()

public getDeprecation(string $id) : array<string|int, mixed>
Parameters
$id : string

Service id relying on this definition

Return values
array<string|int, mixed>

getDeprecationMessage()

public getDeprecationMessage(string $id) : string
Parameters
$id : string
Tags
deprecated

since Symfony 5.1, use "getDeprecation()" instead.

Return values
string

isDeprecated()

public isDeprecated() : bool
Return values
bool

isPrivate()

Whether this alias is private.

public isPrivate() : bool
Return values
bool

isPublic()

Checks if this DI Alias should be public or not.

public isPublic() : bool
Return values
bool

setDeprecated()

Whether this alias is deprecated, that means it should not be referenced anymore.

public setDeprecated() : $this
Tags
throws
InvalidArgumentException

when the message template is invalid

Return values
$this

setPrivate()

Sets if this Alias is private.

public setPrivate(bool $boolean) : $this
Parameters
$boolean : bool
Tags
deprecated

since Symfony 5.2, use setPublic() instead

Return values
$this

setPublic()

Sets if this Alias is public.

public setPublic(bool $boolean) : $this
Parameters
$boolean : bool
Return values
$this

Search results