Class Generator
identifies the agent used to generate a feed, for debugging and other purposes.
Methods summary
public
|
#
__construct( mixed $o = null )
Constructs a Generator from a (parsed) JSON hash
Constructs a Generator from a (parsed) JSON hash
Parameters
- $o
- Either an array (JSON) or an XMLReader.
Throws
Exception
|
public
string
|
|
public
|
|
public
string
|
#
getUri( )
link to a representation that is relevant to the generating agent.
link to a representation that is relevant to the generating agent.
Returns
string
|
public
|
#
setUri( string $uri )
link to a representation that is relevant to the generating agent.
link to a representation that is relevant to the generating agent.
Parameters
|
public
string
|
#
getLang( )
The language.
Returns
string
|
public
|
|
public
string
|
#
getVersion( )
the version of the generating agent
the version of the generating agent
Returns
string
|
public
|
#
setVersion( string $version )
the version of the generating agent
the version of the generating agent
Parameters
|
public
string
|
#
getValue( )
human-readable name for the generating agent
human-readable name for the generating agent
Returns
string
|
public
|
#
setValue( string $value )
human-readable name for the generating agent
human-readable name for the generating agent
Parameters
|
public
array
|
#
toArray( )
Returns the associative array for this Generator
Returns the associative array for this Generator
Returns
array
|
public
string
|
#
toJson( )
Returns the JSON string for this Generator
Returns the JSON string for this Generator
Returns
string
|
public
|
#
initFromArray( array $o )
Initializes this Generator from an associative array
Initializes this Generator from an associative array
Parameters
|
public
|
#
initFromReader( XMLReader $xml )
Initializes this Generator from an XML reader.
Initializes this Generator from an XML reader.
Parameters
- $xml
- The reader to use to initialize this object.
|
public
|
#
writeXmlContents( XMLWriter $writer )
Writes the contents of this Generator to an XML writer. The startElement is expected to be already provided.
Writes the contents of this Generator to an XML writer. The startElement is expected to be already provided.
Parameters
|