Copied!

Class Collection.

Cloneable Instantiable Iterable
  • Implements
    ArrayAccess
    Countable
    IteratorAggregate
    Stringable
    Traversable
Methods
public __call ( string $method , array $arguments )
 

Attempts to call the method on the first node in
the collection.

  • throws EmptyCollectionException
  • return mixed
public __get ( $key )
 

Attempts to apply the magic get to the first node
in the collection.

  • throws EmptyCollectionException
  • return mixed
public __toString () : string
 

Applies the magic string method to the first node in
the collection.

public count () : int
 

Returns the count of the collection.

public each ( callable $callback )
 

Similar to jQuery "each" method. Calls the callback with each
Node in this collection.

public getIterator () : ArrayIterator
 

Returns an iterator for the collection.

public offsetExists ( $offset ) : bool
 

Checks if an offset exists.

public offsetGet ( $offset )
 

Gets a node at the given offset, or null.

  • return mixed
public offsetSet ( $offset , $value ) : void
 

Set an attribute by the given offset.

public offsetUnset ( $offset ) : void
 

Unset a collection Node.

public toArray () : array
 

Returns this collection as an array.

Properties
protected $collection
 

The collection of Nodes.

  • var array
© 2021 Bruce Wells
Search Namespaces \ Classes
Configuration