DOM DOMElement::hasAttribute
(PHP 5, PHP 7, PHP 8)
DOMElement::hasAttribute — 속성이 존재하는지 확인
설명
public DOMElement::hasAttribute(string $qualifiedName
): bool
qualifiedName
이라는 속성이 요소의 구성원으로 존재하는지 여부를 나타냅니다.
매개변수
qualifiedName
- 속성 이름입니다.
반환 값
성공하면 true
를, 실패하면 false
를 반환합니다.
기타
- DOMElement::hasAttributeNS() - 속성이 존재하는지 확인
- DOMElement::getAttribute() - 속성 값을 반환
- DOMElement::setAttribute() - 새 속성을 추가하거나 기존 속성을 수정합니다.
- DOMElement::removeAttribute() - 속성 제거