DOM DOMNodeList 클래스
(PHP 5, PHP 7, PHP 8)
소개
클래스 개요
class DOMNodeList implements IteratorAggregate, Countable {
/* Properties */
public readonly int $length;
/* Methods */
public count(): int
public item(int $index): DOMNode|DOMNameSpaceNode|null
}
Properties
- length
- 목록의 노드 수입니다. 유효한 자식 노드 인덱스의 범위는 0에서
length - 1
까지입니다.
변경 로그
버전 | 설명 |
---|---|
8.0.0 | DOMNodeList는 이제 IteratorAggregate를 구현합니다. 이전에는 Traversable이 대신 구현되었습니다. |
7.2.0 | Countable 인터페이스가 구현되고 length 속성 값을 반환합니다. |
기타
목차
- DOMNodeList::count — 목록의 노드 수 가져오기
- DOMNodeList::item — 인덱스로 지정된 노드를 검색합니다.