Total Complexity | 4 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
18 | class Link extends BaseObject |
||
19 | { |
||
20 | /** |
||
21 | * The self link. |
||
22 | */ |
||
23 | const REL_SELF = 'self'; |
||
24 | |||
25 | /** |
||
26 | * @var string a URI [RFC3986](https://tools.ietf.org/html/rfc3986) or |
||
27 | * URI template [RFC6570](https://tools.ietf.org/html/rfc6570). This property is required. |
||
28 | */ |
||
29 | public $href; |
||
30 | /** |
||
31 | * @var string a secondary key for selecting Link Objects which share the same relation type |
||
32 | */ |
||
33 | public $name; |
||
34 | /** |
||
35 | * @var string a hint to indicate the media type expected when dereferencing the target resource |
||
36 | */ |
||
37 | public $type; |
||
38 | /** |
||
39 | * @var bool a value indicating whether [[href]] refers to a URI or URI template. |
||
40 | */ |
||
41 | public $templated = false; |
||
42 | /** |
||
43 | * @var string a URI that hints about the profile of the target resource. |
||
44 | */ |
||
45 | public $profile; |
||
46 | /** |
||
47 | * @var string a label describing the link |
||
48 | */ |
||
49 | public $title; |
||
50 | /** |
||
51 | * @var string the language of the target resource |
||
52 | */ |
||
53 | public $hreflang; |
||
54 | |||
55 | |||
56 | /** |
||
57 | * Serializes a list of links into proper array format. |
||
58 | * @param array $links the links to be serialized |
||
59 | * @return array the proper array representation of the links. |
||
60 | */ |
||
61 | 8 | public static function serialize(array $links) |
|
76 |