Documentation

ObjectInterface extends Serializable, JsonSerializable

Object Interface

Table of Contents

Methods

defProperty()  : $this
getKey()  : string
getProperty()  : mixed
getType()  : string
hasProperty()  : bool
setProperty()  : $this
unsetProperty()  : $this

Methods

defProperty()

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

Object property to be defined.

$default : mixed

Default value.

Return values
$this

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.

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).

setProperty()

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

Object property to be updated.

$value : mixed

New value.

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