示例#1
0
 /**
  * Start REST service
  *
  * @return bool
  */
 public function startRestService()
 {
     if (!$this->_restService) {
         $this->_restService = RESTServer::create('/api', 'TweetFind\\RESTfulAPI\\Controller\\Routes')->collectRoutes();
         $this->_restService->run();
         return true;
     } else {
         return false;
     }
 }
 /**
  * run() method execute hook
  *
  * @param array $aParams
  * @return array $aDisplay : empty => false / not empty => true
  */
 public function run(array $aParams = array())
 {
     return $this->_oHook->run($aParams);
 }