Interface HasAccessor
Interface for classes implementing the accessor pattern.
Methods summary
public
__get( string $property
)
: mixed
Returns the value of a property.
Returns the value of a property.
Parameters
Returns
mixed
Throws
ICanBoogie\PropertyNotDefined
when the property is not defined.
ICanBoogie\PropertyNotReadable
when the property is not accessible or is write-only
(the property is not defined and only a setter is available).
public
__set( string $property
, mixed $value
)
Sets the value of a property.
Sets the value of a property.
Parameters
Throws
ICanBoogie\PropertyNotWritable
when the property doesn't exists, has no lazy
getter and is not public; or when only a getter is implemented.
public
has_property( string $property
)
: boolean
Whether an object has a property.
Whether an object has a property.
Parameters
Returns
boolean
true
if the object has a property, false
otherwise.
public
has_method( string $method
)
: boolean
Whether an object has a method.
Whether an object has a method.
Parameters
Returns
boolean
true
if the object has a method, false
otherwise.
Constants summary
ACCESSOR_TYPE_GETTER
: string
"get"
ACCESSOR_TYPE_SETTER
: string
"set"
ACCESSOR_IS_LAZY
: string
'lazy'
ACCESSOR_IS_NOT_LAZY
: string
''