PHP 클래스 PHPHtmlParser\Dom\Collection

상속: implements IteratorAggregat\IteratorAggregate, implements ArrayAcces\ArrayAccess, implements Countabl\Countable
파일 보기 프로젝트 열기: paquettg/php-html-parser 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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.

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