trait PropertyLike

internal  
 

Methods

setVisibility(Visibility|string|null $get, Visibility|string|null $set = null)

Sets asymmetric visibility for get and set access modes.

string|null
getVisibility(PropertyAccessMode|string $mode = PropertyAccessMode::Get)

No description

setPublic(PropertyAccessMode|string $mode = PropertyAccessMode::Get)

No description

bool
isPublic(PropertyAccessMode|string $mode = PropertyAccessMode::Get)

No description

setProtected(PropertyAccessMode|string $mode = PropertyAccessMode::Get)

No description

bool
isProtected(PropertyAccessMode|string $mode = PropertyAccessMode::Get)

No description

setPrivate(PropertyAccessMode|string $mode = PropertyAccessMode::Get)

No description

bool
isPrivate(PropertyAccessMode|string $mode = PropertyAccessMode::Get)

No description

setFinal(bool $state = true)

No description

bool
isFinal()

No description

setReadOnly(bool $state = true)

No description

bool
isReadOnly()

No description

setHooks(array $hooks)

Replaces all hooks.

array
getHooks()

No description

addHook(PropertyHookType|string $type, string $shortBody = '')

Adds a get or set hook. When $shortBody is provided, it is used as an arrow-function-style body.

PropertyHook|null
getHook(PropertyHookType|string $type)

No description

bool
hasHook(PropertyHookType|string $type)

No description

Details

at line 36
PropertyLike setVisibility(Visibility|string|null $get, Visibility|string|null $set = null)

Sets asymmetric visibility for get and set access modes.

Parameters

Visibility|string|null $get
Visibility|string|null $set

Return Value

PropertyLike

at line 47
string|null getVisibility(PropertyAccessMode|string $mode = PropertyAccessMode::Get)

No description

Parameters

PropertyAccessMode|string $mode

Return Value

string|null

at line 55
PropertyLike setPublic(PropertyAccessMode|string $mode = PropertyAccessMode::Get)

No description

Parameters

PropertyAccessMode|string $mode

Return Value

PropertyLike

at line 64
bool isPublic(PropertyAccessMode|string $mode = PropertyAccessMode::Get)

No description

Parameters

PropertyAccessMode|string $mode

Return Value

bool

at line 72
PropertyLike setProtected(PropertyAccessMode|string $mode = PropertyAccessMode::Get)

No description

Parameters

PropertyAccessMode|string $mode

Return Value

PropertyLike

at line 81
bool isProtected(PropertyAccessMode|string $mode = PropertyAccessMode::Get)

No description

Parameters

PropertyAccessMode|string $mode

Return Value

bool

at line 89
PropertyLike setPrivate(PropertyAccessMode|string $mode = PropertyAccessMode::Get)

No description

Parameters

PropertyAccessMode|string $mode

Return Value

PropertyLike

at line 98
bool isPrivate(PropertyAccessMode|string $mode = PropertyAccessMode::Get)

No description

Parameters

PropertyAccessMode|string $mode

Return Value

bool

at line 105
PropertyLike setFinal(bool $state = true)

No description

Parameters

bool $state

Return Value

PropertyLike

at line 112
bool isFinal()

No description

Return Value

bool

at line 118
PropertyLike setReadOnly(bool $state = true)

No description

Parameters

bool $state

Return Value

PropertyLike

at line 125
bool isReadOnly()

No description

Return Value

bool

at line 135
PropertyLike setHooks(array $hooks)

Replaces all hooks.

Parameters

array $hooks

Return Value

PropertyLike

at line 144
array getHooks()

No description

Return Value

array

at line 154
PropertyHook addHook(PropertyHookType|string $type, string $shortBody = '')

Adds a get or set hook. When $shortBody is provided, it is used as an arrow-function-style body.

Parameters

PropertyHookType|string $type
string $shortBody

Return Value

PropertyHook

at line 163
PropertyHook|null getHook(PropertyHookType|string $type)

No description

Parameters

PropertyHookType|string $type

Return Value

PropertyHook|null

at line 171
bool hasHook(PropertyHookType|string $type)

No description

Parameters

PropertyHookType|string $type

Return Value

bool