gedcomx-php-client
  • Namespace
  • Class

Namespaces

  • Gedcomx
    • Agent
    • Atom
    • Common
    • Conclusion
    • Extensions
      • FamilySearch
        • Platform
          • Artifacts
          • Discussions
          • Tree
          • Users
        • Rs
          • Client
            • FamilyTree
            • Helpers
            • Memories
            • Util
        • Rt
        • Types
    • GedcomxFile
    • Links
    • Records
    • Rs
      • Client
        • Exception
        • Options
        • Util
    • Rt
    • Search
    • Source
    • Support
    • Types
    • Util
    • Vocab

Classes

  • HypermediaEnabledData
  • Link

Interfaces

  • SupportsLinks

Class Link

A hypermedia link, used to drive the state of a hypermedia-enabled genealogical data application.

Namespace: Gedcomx\Links
Located at Links/Link.php

Methods summary

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

$hreflang
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

$template
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

$title
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

$allow
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

$accept
public string
# getRel( )

The link relationship.

The link relationship.

Returns

string
public
# setRel( string $rel )

The link relationship.

The link relationship.

Parameters

$rel
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

$type
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

$href
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

$o
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

$writer
The XML writer.
gedcomx-php-client API documentation generated by ApiGen