PHP Class FOF30\Hal\Link

See also: http://stateless.co/hal_specification.html
Afficher le fichier Open project: akeeba/fof Class Usage Examples

Protected Properties

Свойство Type Description
$_href string For indicating the target URI. Corresponds with the ’Target IRI’ as defined in Web Linking (RFC 5988). This attribute MAY contain a URI Template (RFC6570) and in which case, SHOULD be complemented by an additional templated attribute on the link with a boolean value true.
$_hreflang string For indicating what the language of the result of dereferencing the link should be.
$_name string For distinguishing between Resource and Link elements that share the same relation
$_templated boolean This attribute SHOULD be present with a boolean value of true when the href of the link contains a URI Template (RFC6570).
$_title string For labeling the destination of a link with a human-readable identifier.

Méthodes publiques

Méthode Description
__construct ( string $href, boolean $templated = false, string $name = null, string $hreflang = null, string $title = null ) Public constructor of a FOFHalLink object
__get ( string $name ) : mixed Magic getter for the protected properties
__set ( string $name, mixed $value ) : void Magic setter for the protected properties
check ( ) : boolean Is this a valid link? Checks the existence of required fields, not their values.

Method Details

__construct() public méthode

Public constructor of a FOFHalLink object
public __construct ( string $href, boolean $templated = false, string $name = null, string $hreflang = null, string $title = null )
$href string See $this->_href
$templated boolean See $this->_templated
$name string See $this->_name
$hreflang string See $this->_hreflang
$title string See $this->_title

__get() public méthode

Magic getter for the protected properties
public __get ( string $name ) : mixed
$name string The name of the property to retrieve, sans the underscore
Résultat mixed Null will always be returned if the property doesn't exist

__set() public méthode

Magic setter for the protected properties
public __set ( string $name, mixed $value ) : void
$name string The name of the property to set, sans the underscore
$value mixed The value of the property to set
Résultat void

check() public méthode

Is this a valid link? Checks the existence of required fields, not their values.
public check ( ) : boolean
Résultat boolean

Property Details

$_href protected_oe property

For indicating the target URI. Corresponds with the ’Target IRI’ as defined in Web Linking (RFC 5988). This attribute MAY contain a URI Template (RFC6570) and in which case, SHOULD be complemented by an additional templated attribute on the link with a boolean value true.
protected string $_href
Résultat string

$_hreflang protected_oe property

For indicating what the language of the result of dereferencing the link should be.
protected string $_hreflang
Résultat string

$_name protected_oe property

For distinguishing between Resource and Link elements that share the same relation
protected string $_name
Résultat string

$_templated protected_oe property

This attribute SHOULD be present with a boolean value of true when the href of the link contains a URI Template (RFC6570).
protected bool $_templated
Résultat boolean

$_title protected_oe property

For labeling the destination of a link with a human-readable identifier.
protected string $_title
Résultat string