PHP Класс Facebook\InstantArticles\Elements\Element

This class is the meta each tag element that contains rendering code for the tags.
Показать файл Открыть проект Примеры использования класса

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

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