public
|
#
__construct( mixed $o = null )
Constructs a Link from a (parsed) JSON hash
Constructs a Link from a (parsed) JSON hash
Parameters
- $o
- Either an array (JSON) or an XMLReader.
Throws
Exception
|
public
string
|
#
getHreflang( )
The language of the resource being linked to.
The language of the resource being linked to.
Returns
string
|
public
|
#
setHreflang( string $hreflang )
The language of the resource being linked to.
The language of the resource being linked to.
Parameters
|
public
string
|
#
getTemplate( )
A URI template per <a href="http://tools.ietf.org/html/rfc6570">RFC 6570</a>, used to link to a range of
URIs, such as for the purpose of linking to a query.
A URI template per <a href="http://tools.ietf.org/html/rfc6570">RFC 6570</a>, used to link to a range of
URIs, such as for the purpose of linking to a query.
Returns
string
|
public
|
#
setTemplate( string $template )
A URI template per <a href="http://tools.ietf.org/html/rfc6570">RFC 6570</a>, used to link to a range of
URIs, such as for the purpose of linking to a query.
A URI template per <a href="http://tools.ietf.org/html/rfc6570">RFC 6570</a>, used to link to a range of
URIs, such as for the purpose of linking to a query.
Parameters
|
public
string
|
#
getTitle( )
Human-readable information about the link.
Human-readable information about the link.
Returns
string
|
public
|
#
setTitle( string $title )
Human-readable information about the link.
Human-readable information about the link.
Parameters
|
public
string
|
#
getAllow( )
Metadata about the available media type(s) of the resource being linked to.
Metadata about the available media type(s) of the resource being linked to.
Returns
string
|
public
|
#
setAllow( string $allow )
Metadata about the available media type(s) of the resource being linked to.
Metadata about the available media type(s) of the resource being linked to.
Parameters
|
public
string
|
#
getAccept( )
Metadata about the available media type(s) of the resource being linked to.
Metadata about the available media type(s) of the resource being linked to.
Returns
string
|
public
|
#
setAccept( string $accept )
Metadata about the available media type(s) of the resource being linked to.
Metadata about the available media type(s) of the resource being linked to.
Parameters
|
public
string
|
#
getRel( )
The link relationship.
Returns
string
|
public
|
#
setRel( string $rel )
The link relationship.
Parameters
|
public
string
|
#
getType( )
Metadata about the available media type(s) of the resource being linked to.
Metadata about the available media type(s) of the resource being linked to.
Returns
string
|
public
|
#
setType( string $type )
Metadata about the available media type(s) of the resource being linked to.
Metadata about the available media type(s) of the resource being linked to.
Parameters
|
public
string
|
#
getHref( )
The target IRI of the link.
The target IRI of the link.
Returns
string
|
public
|
#
setHref( string $href )
The target IRI of the link.
The target IRI of the link.
Parameters
|
public
array
|
#
toArray( )
Returns the associative array for this Link
Returns the associative array for this Link
Returns
array
|
public
string
|
#
toJson( )
Returns the JSON string for this Link
Returns the JSON string for this Link
Returns
string
|
public
|
#
initFromArray( array $o )
Initializes this Link from an associative array
Initializes this Link from an associative array
Parameters
|
public
|
#
initFromReader( XMLReader $xml )
Initializes this Link from an XML reader.
Initializes this Link from an XML reader.
Parameters
- $xml
- The reader to use to initialize this object.
|
public
|
#
toXml( XMLWriter $writer, boolean $includeNamespaces = true )
Writes this Link to an XML writer.
Writes this Link 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 Link to an XML writer. The startElement is expected to be already provided.
Writes the contents of this Link to an XML writer. The startElement is expected to be already provided.
Parameters
|