예제 #1
0
 public function __construct()
 {
     parent::__construct();
     $class = join('', array_slice(explode('\\', get_class($this)), -1));
     $file = static::$CONFIG_DIR . "/{$class}.yaml";
     $this->config = Yaml::parse(file_get_contents($file));
     if (isset($this->config['_uriSpace'])) {
         $this->uriSpaceService = new URISpaceService($this->config['_uriSpace']);
     }
 }
예제 #2
0
파일: Server.php 프로젝트: gbv/jskos-php
 /**
  * Create a Response object with standard JSKOS-API headers.
  * @param integer $code HTTP Status code
  * @return Response
  */
 protected function basicResponse($code = 200, $content = null)
 {
     return new Response($code, ['Access-Control-Allow-Origin' => '*', 'X-JSKOS-API-Version' => self::$API_VERSION, 'Link-Template' => '<' . $this->service->uriTemplate() . '>; rel="search"'], $content);
 }