AbstractElementCollection
class AbstractElementCollection extends ArrayObject (View source)
Represents a list of elements.
Properties
protected string | $elementClass | Element class, that is allowed in the collection. |
Methods
__construct(array $elements = array())
Initializes collection with a list of elements.
boolean
acceptElement(mixed $element)
Determines if an element can be added to a collection.
void
offsetSet(mixed $index, mixed $newval)
Offset to set.
static AbstractElementCollection
fromNodeElements(array $node_elements, string $element_class = null, IPageFactory $page_factory)
Creates new collection by wrapping given array of Node elements.
boolean
isNodeElementAware(string $class_name)
Determines if class is NodeElement aware.
boolean
assertElement(mixed $element)
Checks that element's class is allowed in collection.
Expectation
shouldReceive(string $name)
No description
Details
at line 40
__construct(array $elements = array())
Initializes collection with a list of elements.
at line 67
protected boolean
acceptElement(mixed $element)
Determines if an element can be added to a collection.
at line 80
void
offsetSet(mixed $index, mixed $newval)
Offset to set.
at line 99
static AbstractElementCollection
fromNodeElements(array $node_elements, string $element_class = null, IPageFactory $page_factory)
Creates new collection by wrapping given array of Node elements.
at line 131
protected boolean
isNodeElementAware(string $class_name)
Determines if class is NodeElement aware.
at line 150
protected boolean
assertElement(mixed $element)
Checks that element's class is allowed in collection.