PHP Класс PHPHtmlParser\Dom\Collection

Наследование: implements IteratorAggregat\IteratorAggregate, implements ArrayAcces\ArrayAccess, implements Countabl\Countable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$collection The collection of Nodes.

Открытые методы

Метод Описание
__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.

Описание методов

__call() публичный Метод

Attempts to call the method on the first node in the collection.
public __call ( string $method, array $arguments ) : mixed;
$method string
$arguments array
Результат mixed;

__get() публичный Метод

Attempts to apply the magic get to the first node in the collection.
public __get ( mixed $key ) : mixed
$key mixed
Результат mixed

__toString() публичный Метод

Applies the magic string method to the first node in the collection.
public __toString ( ) : string
Результат string

count() публичный Метод

Returns the count of the collection.
public count ( ) : integer
Результат integer

each() публичный Метод

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

getIterator() публичный Метод

Returns an iterator for the collection.
public getIterator ( ) : ArrayIterator
Результат ArrayIterator

offsetExists() публичный Метод

Checks if an offset exists.
public offsetExists ( mixed $offset ) : boolean
$offset mixed
Результат boolean

offsetGet() публичный Метод

Gets a node at the given offset, or null
public offsetGet ( mixed $offset ) : mixed
$offset mixed
Результат mixed

offsetSet() публичный Метод

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

offsetUnset() публичный Метод

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

toArray() публичный Метод

Returns this collection as an array.
public toArray ( ) : array
Результат array

Описание свойств

$collection защищенное свойство

The collection of Nodes.
protected $collection