PHP Class eZ\Publish\Core\REST\Common\Output\Generator\Xml

Inheritance: extends eZ\Publish\Core\REST\Common\Output\Generator
Show file Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$hashGenerator eZ\Publish\Core\REST\Common\Output\Generator\Xml\FieldTypeHashGenerator Generator for field type hash values.
$isEmpty boolean Keeps track if the document received some content.
$xmlWriter XMLWriter XMLWriter.

Public Methods

Method Description
__construct ( FieldTypeHashGenerator $hashGenerator )
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.
serializeBool ( boolean $boolValue ) : string Serializes a boolean value.
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, array $attributes = [] ) Start value element.

Method Details

__construct() public method

public __construct ( FieldTypeHashGenerator $hashGenerator )
$hashGenerator eZ\Publish\Core\REST\Common\Output\Generator\Xml\FieldTypeHashGenerator

endAttribute() public method

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

endDocument() public method

Returns the generated document as a string.
public endDocument ( mixed $data ) : string
$data mixed
return string

endHashElement() public method

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

endList() public method

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

endObjectElement() public method

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

endValueElement() public method

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

generateFieldTypeHash() public method

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

getMediaType() public method

Get media type.
public getMediaType ( string $name ) : string
$name string
return string

isEmpty() public method

Returns if the document is empty or already contains data.
public isEmpty ( ) : boolean
return boolean

serializeBool() public method

Serializes a boolean value.
public serializeBool ( boolean $boolValue ) : string
$boolValue boolean
return string

startAttribute() public method

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

startDocument() public method

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

startHashElement() public method

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

startList() public method

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

startObjectElement() public method

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

startValueElement() public method

Start value element.
public startValueElement ( string $name, string $value, array $attributes = [] )
$name string
$value string
$attributes array

Property Details

$hashGenerator protected property

Generator for field type hash values.
protected FieldTypeHashGenerator,eZ\Publish\Core\REST\Common\Output\Generator\Xml $hashGenerator
return eZ\Publish\Core\REST\Common\Output\Generator\Xml\FieldTypeHashGenerator

$isEmpty protected property

Keeps track if the document received some content.
protected bool $isEmpty
return boolean

$xmlWriter protected property

XMLWriter.
protected XMLWriter $xmlWriter
return XMLWriter