1 | <?php |
||
8 | class Links |
||
9 | { |
||
10 | /** |
||
11 | * @var array[string]Link Map a link name to it's representation. |
||
12 | */ |
||
13 | private $links; |
||
14 | |||
15 | /** |
||
16 | * Links constructor. |
||
17 | * |
||
18 | * @param \stdClass $links "_link" returned from the API, if there isn't any. |
||
19 | */ |
||
20 | public function __construct(\stdClass $links) |
||
24 | |||
25 | /** |
||
26 | * @param \stdClass $links |
||
27 | */ |
||
28 | private function parseLinks(\stdClass $links) |
||
38 | |||
39 | /** |
||
40 | * Returns all the links from the HATEOAS structure. |
||
41 | * |
||
42 | * @return array[string]Link. |
||
|
|||
43 | */ |
||
44 | public function getLinks() |
||
48 | |||
49 | /** |
||
50 | * @param $name string Links name, e.g: "self". |
||
51 | * |
||
52 | * @return null|Link Link object of the corresponding $name or null if the link doesn't exist. |
||
53 | */ |
||
54 | public function getLink($name) |
||
61 | } |
||
62 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.