\BrickrougeDataset

Custom data attributes are intended to store custom data private to the page or application, for which there are no more appropriate attributes or elements.

Summary

Methods
Properties
Constants
__construct()
offsetSet()
offsetGet()
offsetExists()
offsetUnset()
getIterator()
to_array()
No public properties found
No constants found
serialize_property()
unserialize_property()
$element
N/A
No private methods found
No private properties found
N/A

Properties

Methods

__construct()

__construct(\Brickrouge\Element  $element, array  $properties = array()) 

Constructor.

Parameters

\Brickrouge\Element $element

The target element.

array $properties

The initial properties of the dataset.

offsetSet()

offsetSet(string  $property, mixed  $value) 

Sets the value of a property.

The attribute corresponding to the property is set.

Parameters

string $property
mixed $value

offsetGet()

offsetGet(string  $property, mixed|null  $default = null) : mixed

Returns the value of a property,

The value is gotten from the attribute corresponding to the property.

Parameters

string $property
mixed|null $default

Returns

mixed

offsetExists()

offsetExists(string  $property) : boolean

Checks if a data attribute exists.

Parameters

string $property

Returns

boolean

offsetUnset()

offsetUnset(string  $property) 

Unset a data attribute.

Parameters

string $property

getIterator()

getIterator() : \ArrayIterator

Returns an iterator for the data attributes.

Returns

\ArrayIterator

to_array()

to_array() : array

Returns an array representation of the dataset.

Returns

array

serialize_property()

serialize_property(string  $property) : string

Parameters

string $property

Returns

string

unserialize_property()

unserialize_property(string  $property) : string

Parameters

string $property

Returns

string