eZPublishCommunityProject  2013.5
eZ\Publish\Core\REST\Common\Output\Generator\Xml Class Reference

Xml generator. More...

+ Inheritance diagram for eZ\Publish\Core\REST\Common\Output\Generator\Xml:
+ Collaboration diagram for eZ\Publish\Core\REST\Common\Output\Generator\Xml:

Public Member Functions

 __construct (Xml\FieldTypeHashGenerator $hashGenerator)
 
 endAttribute ($name)
 End attribute. More...
 
 endDocument ($data)
 End document. More...
 
 endHashElement ($name)
 End hash element. More...
 
 endList ($name)
 End list. More...
 
 endObjectElement ($name)
 End object element. More...
 
 endValueElement ($name)
 End value element. More...
 
 generateFieldTypeHash ($hashElementName, $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. More...
 
 getMediaType ($name)
 Get media type. More...
 
 isEmpty ()
 Returns if the document is empty or already contains data. More...
 
 startAttribute ($name, $value)
 Start attribute. More...
 
 startDocument ($data)
 Start document. More...
 
 startHashElement ($name)
 Start hash element. More...
 
 startList ($name)
 Start list. More...
 
 startObjectElement ($name, $mediaTypeName=null)
 Start object element. More...
 
 startValueElement ($name, $value, $attributes=array())
 Start value element. More...
 
- Public Member Functions inherited from eZ\Publish\Core\REST\Common\Output\Generator
 endAttribute ($name)
 End attribute. More...
 
 endDocument ($data)
 End document. More...
 
 endHashElement ($name)
 End hash element. More...
 
 endList ($name)
 End list. More...
 
 endObjectElement ($name)
 End object element. More...
 
 endValueElement ($name)
 End value element. More...
 
 generateFieldTypeHash ($hashElementName, $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. More...
 
 getMediaType ($name)
 Get media type. More...
 
 isEmpty ()
 Returns if the document is empty or already contains data. More...
 
 reset ()
 Reset output visitor to a virgin state. More...
 
 startAttribute ($name, $value)
 Start attribute. More...
 
 startDocument ($data)
 Start document. More...
 
 startHashElement ($name)
 Start hash element. More...
 
 startList ($name)
 Start list. More...
 
 startObjectElement ($name, $mediaTypeName=null)
 Start object element. More...
 
 startValueElement ($name, $value)
 Start value element. More...
 

Protected Attributes

 $hashGenerator
 
 $isEmpty = true
 
 $xmlWriter
 
- Protected Attributes inherited from eZ\Publish\Core\REST\Common\Output\Generator
 $stack = array()
 

Additional Inherited Members

- Protected Member Functions inherited from eZ\Publish\Core\REST\Common\Output\Generator
 checkEnd ($type, $data)
 Check close / end operation. More...
 
 checkEndAttribute ($data)
 Check end attribute. More...
 
 checkEndDocument ($data)
 Check end document. More...
 
 checkEndHashElement ($data)
 Check end hash element. More...
 
 checkEndList ($data)
 Check end list. More...
 
 checkEndObjectElement ($data)
 Check end object element. More...
 
 checkEndValueElement ($data)
 Check end value element. More...
 
 checkStart ($type, $data, array $validParents)
 Check close / end operation. More...
 
 checkStartAttribute ($data)
 Check start attribute. More...
 
 checkStartDocument ($data)
 Check start document. More...
 
 checkStartHashElement ($data)
 Check start hash element. More...
 
 checkStartList ($data)
 Check start list. More...
 
 checkStartObjectElement ($data)
 Check start object element. More...
 
 checkStartValueElement ($data)
 Check start value element. More...
 
 generateMediaType ($name, $type)
 Generates a media type from $name and $type. More...
 

Detailed Description

Xml generator.

Constructor & Destructor Documentation

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

Member Function Documentation

eZ\Publish\Core\REST\Common\Output\Generator\Xml::endAttribute (   $name)

End attribute.

Parameters
string$name

Referenced by eZ\Publish\Core\REST\Common\Output\Generator\Xml\startObjectElement().

eZ\Publish\Core\REST\Common\Output\Generator\Xml::endDocument (   $data)

End document.

Returns the generated document as a string.

Parameters
mixed$data
Returns
string
eZ\Publish\Core\REST\Common\Output\Generator\Xml::endHashElement (   $name)

End hash element.

Parameters
string$name
eZ\Publish\Core\REST\Common\Output\Generator\Xml::endList (   $name)

End list.

Parameters
string$name
eZ\Publish\Core\REST\Common\Output\Generator\Xml::endObjectElement (   $name)

End object element.

Parameters
string$name
eZ\Publish\Core\REST\Common\Output\Generator\Xml::endValueElement (   $name)

End value element.

Parameters
string$name
eZ\Publish\Core\REST\Common\Output\Generator\Xml::generateFieldTypeHash (   $hashElementName,
  $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
eZ\Publish\Core\REST\Common\Output\Generator\Xml::getMediaType (   $name)

Get media type.

Parameters
string$name
Returns
string

Referenced by eZ\Publish\Core\REST\Common\Output\Generator\Xml\startObjectElement().

eZ\Publish\Core\REST\Common\Output\Generator\Xml::isEmpty ( )
eZ\Publish\Core\REST\Common\Output\Generator\Xml::startAttribute (   $name,
  $value 
)

Start attribute.

Parameters
string$name
string$value

Referenced by eZ\Publish\Core\REST\Common\Output\Generator\Xml\startObjectElement().

eZ\Publish\Core\REST\Common\Output\Generator\Xml::startDocument (   $data)

Start document.

Parameters
mixed$data
eZ\Publish\Core\REST\Common\Output\Generator\Xml::startHashElement (   $name)

Start hash element.

Parameters
string$name
eZ\Publish\Core\REST\Common\Output\Generator\Xml::startList (   $name)

Start list.

Parameters
string$name
eZ\Publish\Core\REST\Common\Output\Generator\Xml::startObjectElement (   $name,
  $mediaTypeName = null 
)

Start object element.

Parameters
string$name
string$mediaTypeName
eZ\Publish\Core\REST\Common\Output\Generator\Xml::startValueElement (   $name,
  $value,
  $attributes = array() 
)

Start value element.

Parameters
string$name
string$value
array$attributes

Member Data Documentation

eZ\Publish\Core\REST\Common\Output\Generator\Xml::$hashGenerator
protected
eZ\Publish\Core\REST\Common\Output\Generator\Xml::$isEmpty = true
protected
eZ\Publish\Core\REST\Common\Output\Generator\Xml::$xmlWriter
protected

The documentation for this class was generated from the following file: