PHP 클래스 Facebook\InstantArticles\Elements\Element

This class is the meta each tag element that contains rendering code for the tags.
파일 보기 프로젝트 열기: facebook/facebook-instant-articles-sdk-php 1 사용 예제들

공개 메소드들

메소드 설명
disableEmptyValidation ( ) Marks this Paragraph to *not* be ignored on isValid if it is empty.
enableEmptyValidation ( ) Marks this Paragraph to be ignored on isValid if it is empty.
getClassName ( ) : string Auxiliary method to extract all Elements full qualified class name.
isEmptyValidationEnabled ( ) : boolean Method that checks if empty element will warn on InstantArticleValidator.
isValid ( ) : boolean Method that checks if the element is valid, not empty. If !valid() it wont be rendered.
render ( string $doctype = '', boolean $formatted = false ) : string Renders the Element content
toDOMElement ( $document = null )

보호된 메소드들

메소드 설명
emptyElement ( DOMDocument $document ) Method to create an empty fragment if isValid() is false in toDOMElement()

메소드 상세

disableEmptyValidation() 공개 메소드

Marks this Paragraph to *not* be ignored on isValid if it is empty.

emptyElement() 보호된 메소드

Method to create an empty fragment if isValid() is false in toDOMElement()
protected emptyElement ( DOMDocument $document )
$document DOMDocument the document that will contain the empty element.

enableEmptyValidation() 공개 메소드

Marks this Paragraph to be ignored on isValid if it is empty.

getClassName() 공개 정적인 메소드

Auxiliary method to extract all Elements full qualified class name.
public static getClassName ( ) : string
리턴 string The full qualified name of class.

isEmptyValidationEnabled() 공개 메소드

Method that checks if empty element will warn on InstantArticleValidator.
또한 보기: InstantArticleValidator
public isEmptyValidationEnabled ( ) : boolean
리턴 boolean true for ignore, false otherwise.

isValid() 공개 메소드

Method that checks if the element is valid, not empty. If !valid() it wont be rendered.
public isValid ( ) : boolean
리턴 boolean true for valid element, false otherwise.

render() 공개 메소드

Renders the Element content
public render ( string $doctype = '', boolean $formatted = false ) : string
$doctype string the doctype will be applied to document. I.e.: ''.
$formatted boolean Whether to format output.
리턴 string with the content rendered.

toDOMElement() 추상적인 공개 메소드

abstract public toDOMElement ( $document = null )