PHP Class yii\web\Link

Since: 2.0
Author: Qiang Xue ([email protected])
Inheritance: extends yii\base\Object
Show file Open project: yiisoft/yii2 Class Usage Examples

Public Properties

Property Type Description
$href a URI RFC3986 or URI template RFC6570. This property is required.
$hreflang the language of the target resource
$name a secondary key for selecting Link Objects which share the same relation type
$profile a URI that hints about the profile of the target resource.
$templated a value indicating whether [[href]] refers to a URI or URI template.
$title a label describing the link
$type a hint to indicate the media type expected when dereferencing the target resource

Public Methods

Method Description
serialize ( array $links ) : array Serializes a list of links into proper array format.

Method Details

serialize() public static method

Serializes a list of links into proper array format.
public static serialize ( array $links ) : array
$links array the links to be serialized
return array the proper array representation of the links.

Property Details

$href public property

a URI RFC3986 or URI template RFC6570. This property is required.
public $href

$hreflang public property

the language of the target resource
public $hreflang

$name public property

a secondary key for selecting Link Objects which share the same relation type
public $name

$profile public property

a URI that hints about the profile of the target resource.
public $profile

$templated public property

a value indicating whether [[href]] refers to a URI or URI template.
public $templated

$title public property

a label describing the link
public $title

$type public property

a hint to indicate the media type expected when dereferencing the target resource
public $type