Documentation

Alias
in package

Table of Contents

Constants

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  : array<string|int, mixed>
$id  : string
$public  : bool

Methods

__construct()  : mixed
__toString()  : string
getDeprecation()  : array<string|int, mixed>
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.
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 array<string|int, mixed> $deprecation = []

$public

private bool $public

Methods

__construct()

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

__toString()

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>

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(string $package, string $version, string $message) : $this
Parameters
$package : string

The name of the composer package that is triggering the deprecation

$version : string

The version of the package that introduced the deprecation

$message : string

The deprecation message to use

Tags
throws
InvalidArgumentException

when the message template is invalid

Return values
$this

setPublic()

Sets if this Alias is public.

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

        
On this page

Search results