Class

eZ\Publish\Core\REST\Common\Output\Generator

abstract class Generator

Output generator.

Methods

setFormatOutput($formatOutput)

reset()

Reset output visitor to a virgin state.

startDocument(mixed $data)

Start document.

bool isEmpty()

Returns if the document is empty or already contains data.

string endDocument(mixed $data)

End document.

startObjectElement(string $name, string $mediaTypeName = null)

Start object element.

endObjectElement(string $name)

End object element.

startHashElement(string $name)

Start hash element.

endHashElement(string $name)

End hash element.

startValueElement(string $name, string $value)

Start value element.

endValueElement(string $name)

End value element.

startList(string $name)

Start list.

endList(string $name)

End list.

startAttribute(string $name, string $value)

Start attribute.

endAttribute(string $name)

End attribute.

string getMediaType(string $name)

Get media type.

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.

mixed serializeBool(bool $boolValue)

Serializes a boolean value.

Details

at line 33
public setFormatOutput($formatOutput)

Parameters

$formatOutput

at line 41
public reset()

Reset output visitor to a virgin state.

at line 52
abstract public startDocument(mixed $data)

Start document.

Parameters

mixed $data

at line 59
abstract public bool isEmpty()

Returns if the document is empty or already contains data.

Return Value

bool

at line 86
abstract public string endDocument(mixed $data)

End document.

Returns the generated document as a string.

Parameters

mixed $data

Return Value

string

at line 104
abstract public startObjectElement(string $name, string $mediaTypeName = null)

Start object element.

Parameters

string $name
string $mediaTypeName

at line 132
abstract public endObjectElement(string $name)

End object element.

Parameters

string $name

at line 149
abstract public startHashElement(string $name)

Start hash element.

Parameters

string $name

at line 177
abstract public endHashElement(string $name)

End hash element.

Parameters

string $name

at line 195
abstract public startValueElement(string $name, string $value)

Start value element.

Parameters

string $name
string $value

at line 212
abstract public endValueElement(string $name)

End value element.

Parameters

string $name

at line 229
abstract public startList(string $name)

Start list.

Parameters

string $name

at line 246
abstract public endList(string $name)

End list.

Parameters

string $name

at line 264
abstract public startAttribute(string $name, string $value)

Start attribute.

Parameters

string $name
string $value

at line 281
abstract public endAttribute(string $name)

End attribute.

Parameters

string $name

at line 300
abstract public string getMediaType(string $name)

Get media type.

Parameters

string $name

Return Value

string

at line 323
abstract public 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.

Parameters

string $hashElementName
mixed $hashValue

at line 396
abstract public mixed serializeBool(bool $boolValue)

Serializes a boolean value.

Parameters

bool $boolValue

Return Value

mixed