PHP Класс FOF30\Hal\Link

См. также: http://stateless.co/hal_specification.html
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_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.

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

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() публичный Метод

Magic getter for the protected properties
public __get ( string $name ) : mixed
$name string The name of the property to retrieve, sans the underscore
Результат mixed Null will always be returned if the property doesn't exist

__set() публичный Метод

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
Результат void

check() публичный Метод

Is this a valid link? Checks the existence of required fields, not their values.
public check ( ) : boolean
Результат boolean

Описание свойств

$_href защищенное свойство

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
Результат string

$_hreflang защищенное свойство

For indicating what the language of the result of dereferencing the link should be.
protected string $_hreflang
Результат string

$_name защищенное свойство

For distinguishing between Resource and Link elements that share the same relation
protected string $_name
Результат string

$_templated защищенное свойство

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
Результат boolean

$_title защищенное свойство

For labeling the destination of a link with a human-readable identifier.
protected string $_title
Результат string