예제 #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');
 }
예제 #2
0
파일: noparam.php 프로젝트: devsnippet/SMA
<textarea rows="10" cols="50">
    <?php 
echo q::z()->arrayToSimpleXml(q::apiRoute()->get(''))->asXML();
?>
</textarea>
예제 #3
0
파일: filtered.php 프로젝트: devsnippet/SMA
<textarea rows="10" cols="50">
    <?php 
echo q::z()->arrayToSimpleXml(q::apiRoute()->get('user', array('login')))->asXML();
?>
</textarea>