PHP Класс eZ\Publish\Core\REST\Common\Output\Generator

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$formatOutput boolean If set to true, output will be formatted and indented.
$stack array Use to check if it is OK to start / close the requested element in the current state.

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

Метод Описание
endAttribute ( string $name ) End attribute.
endDocument ( mixed $data ) : string End document.
endHashElement ( string $name ) End hash element.
endList ( string $name ) End list.
endObjectElement ( string $name ) End object element.
endValueElement ( string $name ) End value element.
generateFieldTypeHash ( string $hashElementName, mixed $hashValue ) Generates a generic representation of the scalar, hash or list given in $hashValue into the document, using an element of $hashElementName as its parent.
getMediaType ( string $name ) : string Get media type.
isEmpty ( ) : boolean Returns if the document is empty or already contains data.
reset ( ) Reset output visitor to a virgin state.
serializeBool ( boolean $boolValue ) : mixed Serializes a boolean value.
setFormatOutput ( $formatOutput )
startAttribute ( string $name, string $value ) Start attribute.
startDocument ( mixed $data ) Start document.
startHashElement ( string $name ) Start hash element.
startList ( string $name ) Start list.
startObjectElement ( string $name, string $mediaTypeName = null ) Start object element.
startValueElement ( string $name, string $value ) Start value element.

Защищенные методы

Метод Описание
checkEnd ( string $type, mixed $data ) Check close / end operation.
checkEndAttribute ( mixed $data ) Check end attribute.
checkEndDocument ( mixed $data ) Check end document.
checkEndHashElement ( mixed $data ) Check end hash element.
checkEndList ( mixed $data ) Check end list.
checkEndObjectElement ( mixed $data ) Check end object element.
checkEndValueElement ( mixed $data ) Check end value element.
checkStart ( string $type, mixed $data, array $validParents ) Check close / end operation.
checkStartAttribute ( mixed $data ) Check start attribute.
checkStartDocument ( mixed $data ) Check start document.
checkStartHashElement ( mixed $data ) Check start hash element.
checkStartList ( mixed $data ) Check start list.
checkStartObjectElement ( mixed $data ) Check start object element.
checkStartValueElement ( mixed $data ) Check start value element.
generateMediaType ( string $name, string $type ) : string Generates a media type from $name and $type.

Описание методов

checkEnd() защищенный Метод

Check close / end operation.
protected checkEnd ( string $type, mixed $data )
$type string
$data mixed

checkEndAttribute() защищенный Метод

Check end attribute.
protected checkEndAttribute ( mixed $data )
$data mixed

checkEndDocument() защищенный Метод

Check end document.
protected checkEndDocument ( mixed $data )
$data mixed

checkEndHashElement() защищенный Метод

Check end hash element.
protected checkEndHashElement ( mixed $data )
$data mixed

checkEndList() защищенный Метод

Check end list.
protected checkEndList ( mixed $data )
$data mixed

checkEndObjectElement() защищенный Метод

Check end object element.
protected checkEndObjectElement ( mixed $data )
$data mixed

checkEndValueElement() защищенный Метод

Check end value element.
protected checkEndValueElement ( mixed $data )
$data mixed

checkStart() защищенный Метод

Check close / end operation.
protected checkStart ( string $type, mixed $data, array $validParents )
$type string
$data mixed
$validParents array

checkStartAttribute() защищенный Метод

Check start attribute.
protected checkStartAttribute ( mixed $data )
$data mixed

checkStartDocument() защищенный Метод

Check start document.
protected checkStartDocument ( mixed $data )
$data mixed

checkStartHashElement() защищенный Метод

Check start hash element.
protected checkStartHashElement ( mixed $data )
$data mixed

checkStartList() защищенный Метод

Check start list.
protected checkStartList ( mixed $data )
$data mixed

checkStartObjectElement() защищенный Метод

Check start object element.
protected checkStartObjectElement ( mixed $data )
$data mixed

checkStartValueElement() защищенный Метод

Check start value element.
protected checkStartValueElement ( mixed $data )
$data mixed

endAttribute() абстрактный публичный Метод

End attribute.
abstract public endAttribute ( string $name )
$name string

endDocument() абстрактный публичный Метод

Returns the generated document as a string.
abstract public endDocument ( mixed $data ) : string
$data mixed
Результат string

endHashElement() абстрактный публичный Метод

End hash element.
abstract public endHashElement ( string $name )
$name string

endList() абстрактный публичный Метод

End list.
abstract public endList ( string $name )
$name string

endObjectElement() абстрактный публичный Метод

End object element.
abstract public endObjectElement ( string $name )
$name string

endValueElement() абстрактный публичный Метод

End value element.
abstract public endValueElement ( string $name )
$name string

generateFieldTypeHash() абстрактный публичный Метод

Generates a generic representation of the scalar, hash or list given in $hashValue into the document, using an element of $hashElementName as its parent.
abstract public generateFieldTypeHash ( string $hashElementName, mixed $hashValue )
$hashElementName string
$hashValue mixed

generateMediaType() защищенный Метод

Generates a media type from $name and $type.
protected generateMediaType ( string $name, string $type ) : string
$name string
$type string
Результат string

getMediaType() абстрактный публичный Метод

Get media type.
abstract public getMediaType ( string $name ) : string
$name string
Результат string

isEmpty() абстрактный публичный Метод

Returns if the document is empty or already contains data.
abstract public isEmpty ( ) : boolean
Результат boolean

reset() публичный Метод

Reset output visitor to a virgin state.
public reset ( )

serializeBool() абстрактный публичный Метод

Serializes a boolean value.
abstract public serializeBool ( boolean $boolValue ) : mixed
$boolValue boolean
Результат mixed

setFormatOutput() публичный Метод

public setFormatOutput ( $formatOutput )

startAttribute() абстрактный публичный Метод

Start attribute.
abstract public startAttribute ( string $name, string $value )
$name string
$value string

startDocument() абстрактный публичный Метод

Start document.
abstract public startDocument ( mixed $data )
$data mixed

startHashElement() абстрактный публичный Метод

Start hash element.
abstract public startHashElement ( string $name )
$name string

startList() абстрактный публичный Метод

Start list.
abstract public startList ( string $name )
$name string

startObjectElement() абстрактный публичный Метод

Start object element.
abstract public startObjectElement ( string $name, string $mediaTypeName = null )
$name string
$mediaTypeName string

startValueElement() абстрактный публичный Метод

Start value element.
abstract public startValueElement ( string $name, string $value )
$name string
$value string

Описание свойств

$formatOutput защищенное свойство

If set to true, output will be formatted and indented.
protected bool $formatOutput
Результат boolean

$stack защищенное свойство

Use to check if it is OK to start / close the requested element in the current state.
protected array $stack
Результат array