Пример #1
0
 public static function no_endpoint($response)
 {
     $response->set_status(404);
     $response->set_body(array('error' => 'No such endpoint', 'endpoints' => \veneer\util::get_endpoints()));
 }
Пример #2
0
 /**
  * Check that there are endpoints defined. If there are no endpoints defined,
  * the end user should be alerted as the server is starting up.
  *
  * @return bool
  */
 public function discover_endpoints()
 {
     foreach (\veneer\util::get_endpoints() as $version => $endpoints) {
         foreach ($endpoints as $endpoint) {
             self::debug('Found endpoint: ' . \veneer\util::version('number', $version) . '/' . $endpoint);
         }
     }
 }