PHP Class PHPHtmlParser\Dom\Collection

Inheritance: implements IteratorAggregat\IteratorAggregate, implements ArrayAcces\ArrayAccess, implements Countabl\Countable
Afficher le fichier Open project: paquettg/php-html-parser Class Usage Examples

Protected Properties

Свойство Type Description
$collection The collection of Nodes.

Méthodes publiques

Méthode Description
__call ( string $method, array $arguments ) : mixed; Attempts to call the method on the first node in the collection.
__get ( mixed $key ) : mixed Attempts to apply the magic get to the first node in the collection.
__toString ( ) : string Applies the magic string method to the first node in the collection.
count ( ) : integer Returns the count of the collection.
each ( callback $callback ) Similar to jQuery "each" method. Calls the callback with each Node in this collection.
getIterator ( ) : ArrayIterator Returns an iterator for the collection.
offsetExists ( mixed $offset ) : boolean Checks if an offset exists.
offsetGet ( mixed $offset ) : mixed Gets a node at the given offset, or null
offsetSet ( mixed $offset, mixed $value ) Set an attribute by the given offset
offsetUnset ( mixed $offset ) Unset a collection Node.
toArray ( ) : array Returns this collection as an array.

Method Details

__call() public méthode

Attempts to call the method on the first node in the collection.
public __call ( string $method, array $arguments ) : mixed;
$method string
$arguments array
Résultat mixed;

__get() public méthode

Attempts to apply the magic get to the first node in the collection.
public __get ( mixed $key ) : mixed
$key mixed
Résultat mixed

__toString() public méthode

Applies the magic string method to the first node in the collection.
public __toString ( ) : string
Résultat string

count() public méthode

Returns the count of the collection.
public count ( ) : integer
Résultat integer

each() public méthode

Similar to jQuery "each" method. Calls the callback with each Node in this collection.
public each ( callback $callback )
$callback callback

getIterator() public méthode

Returns an iterator for the collection.
public getIterator ( ) : ArrayIterator
Résultat ArrayIterator

offsetExists() public méthode

Checks if an offset exists.
public offsetExists ( mixed $offset ) : boolean
$offset mixed
Résultat boolean

offsetGet() public méthode

Gets a node at the given offset, or null
public offsetGet ( mixed $offset ) : mixed
$offset mixed
Résultat mixed

offsetSet() public méthode

Set an attribute by the given offset
public offsetSet ( mixed $offset, mixed $value )
$offset mixed
$value mixed

offsetUnset() public méthode

Unset a collection Node.
public offsetUnset ( mixed $offset )
$offset mixed

toArray() public méthode

Returns this collection as an array.
public toArray ( ) : array
Résultat array

Property Details

$collection protected_oe property

The collection of Nodes.
protected $collection