Class ResourceReference
A generic reference to a resource.
Methods summary
public
|
#
__construct( mixed $o = null )
Constructs a ResourceReference from a (parsed) JSON hash
Constructs a ResourceReference from a (parsed) JSON hash
Parameters
- $o
- Either an array (JSON) or an XMLReader.
Throws
Exception
|
public
string
|
#
getResourceId( )
The resource id of the resource being referenced.
The resource id of the resource being referenced.
Returns
string
|
public
|
#
setResourceId( string $resourceId )
The resource id of the resource being referenced.
The resource id of the resource being referenced.
Parameters
|
public
string
|
|
public
|
#
setResource( string $resource )
The URI to the resource.
Parameters
|
public
array
|
#
toArray( )
Returns the associative array for this ResourceReference
Returns the associative array for this ResourceReference
Returns
array
|
public
string
|
#
toJson( )
Returns the JSON string for this ResourceReference
Returns the JSON string for this ResourceReference
Returns
string
|
public
|
#
initFromArray( array $o )
Initializes this ResourceReference from an associative array
Initializes this ResourceReference from an associative array
Parameters
|
public
|
#
initFromReader( XMLReader $xml )
Initializes this ResourceReference from an XML reader.
Initializes this ResourceReference from an XML reader.
Parameters
- $xml
- The reader to use to initialize this object.
|
public
|
#
toXml( XMLWriter $writer, boolean $includeNamespaces = true )
Writes this ResourceReference to an XML writer.
Writes this ResourceReference to an XML writer.
Parameters
- $writer
- The XML writer.
- $includeNamespaces
- Whether to write out the namespaces in the element.
|
public
|
#
writeXmlContents( XMLWriter $writer )
Writes the contents of this ResourceReference to an XML writer. The startElement is expected to be already provided.
Writes the contents of this ResourceReference to an XML writer. The startElement is expected to be already provided.
Parameters
|