1 | <?php |
||
5 | class JsonHalFactory |
||
6 | { |
||
7 | /** |
||
8 | * Decode a application/hal+json document into a Nocarrier\Hal object. |
||
9 | * |
||
10 | * @param string $text |
||
11 | * @param int $depth |
||
12 | * @static |
||
13 | * @access public |
||
14 | * @return \Nocarrier\Hal |
||
15 | */ |
||
16 | public static function fromJson(Hal $hal, $text, $depth = 0) |
||
28 | |||
29 | /** |
||
30 | * @param string $text |
||
31 | */ |
||
32 | private static function prepareJsonData($text) |
||
49 | |||
50 | /** |
||
51 | * @param Hal $hal |
||
52 | * @param array $links |
||
53 | */ |
||
54 | private static function addJsonLinkData($hal, $links) |
||
68 | |||
69 | /** |
||
70 | * @param Hal $hal |
||
71 | * @param array $embedded |
||
72 | * @param integer $depth |
||
73 | */ |
||
74 | private static function setEmbeddedResources(Hal $hal, $embedded, $depth) |
||
88 | } |
||
89 |