Esempio n. 1
1
 public function get()
 {
     $route = array('_links' => array("self" => array("href" => $this->rootUrl), "ea:login" => array('href' => $this->rootUrl . '/api/login'), "ea:user" => array('href' => $this->rootUrl . '/api/user/{id}'), "ea:student" => array('href' => $this->rootUrl . '/api/students')));
     $json = \q::z()->arrayToJSON($route);
     return Response::make($json, '200')->header('Content-Type', 'application/hal+json');
 }
Esempio n. 2
0
<textarea rows="10" cols="50">
    <?php 
echo q::z()->arrayToSimpleXml(q::apiRoute()->get(''))->asXML();
?>
</textarea>
Esempio n. 3
0
<textarea rows="10" cols="50">
    <?php 
echo q::z()->arrayToSimpleXml(q::apiRoute()->get('user', array('login')))->asXML();
?>
</textarea>