Documentation

NestedObjectInterface extends ObjectInterface

Common Interface for both Objects and Collections

Table of Contents

Methods

defNestedProperty()  : $this
defProperty()  : $this
getKey()  : string
getNestedProperty()  : mixed|array<string|int, mixed>
getProperty()  : mixed
getType()  : string
hasNestedProperty()  : bool|array<string|int, bool>
hasProperty()  : bool
setNestedProperty()  : $this
setProperty()  : $this
unsetNestedProperty()  : $this
unsetProperty()  : $this

Methods

defNestedProperty()

public defNestedProperty(string $property, mixed $default[, string|null $separator = null ]) : $this
Parameters
$property : string

Object property to be defined.

$default : mixed

Default value.

$separator : string|null = null

Separator, defaults to '.'

Tags
throws
RuntimeException
Return values
$this

defProperty()

public defProperty(string $property, mixed $default) : $this
Parameters
$property : string

Object property to be defined.

$default : mixed

Default value.

Return values
$this

getNestedProperty()

public getNestedProperty(string $property[, mixed|null $default = null ][, string|null $separator = null ]) : mixed|array<string|int, mixed>
Parameters
$property : string

Object property to be fetched.

$default : mixed|null = null

Default value if property has not been set.

$separator : string|null = null

Separator, defaults to '.'

Return values
mixed|array<string|int, mixed>

Property value.

getProperty()

public getProperty(string $property[, mixed|null $default = null ]) : mixed
Parameters
$property : string

Object property to be fetched.

$default : mixed|null = null

Default value if property has not been set.

Return values
mixed

Property value.

hasNestedProperty()

public hasNestedProperty(string $property[, string|null $separator = null ]) : bool|array<string|int, bool>
Parameters
$property : string

Object property name.

$separator : string|null = null

Separator, defaults to '.'

Return values
bool|array<string|int, bool>

True if property has been defined (can be null).

hasProperty()

public hasProperty(string $property) : bool
Parameters
$property : string

Object property name.

Return values
bool

True if property has been defined (property can be null).

setNestedProperty()

public setNestedProperty(string $property, mixed $value[, string|null $separator = null ]) : $this
Parameters
$property : string

Object property to be updated.

$value : mixed

New value.

$separator : string|null = null

Separator, defaults to '.'

Tags
throws
RuntimeException
Return values
$this

setProperty()

public setProperty(string $property, mixed $value) : $this
Parameters
$property : string

Object property to be updated.

$value : mixed

New value.

Return values
$this

unsetNestedProperty()

public unsetNestedProperty(string $property[, string|null $separator = null ]) : $this
Parameters
$property : string

Object property to be unset.

$separator : string|null = null

Separator, defaults to '.'

Tags
throws
RuntimeException
Return values
$this

unsetProperty()

public unsetProperty(string $property) : $this
Parameters
$property : string

Object property to be unset.

Return values
$this

        
On this page

Search results