Example #1
0
 /**
  * Create server instance.
  * @return Server The configured Glide server.
  */
 public function getServer()
 {
     $server = new Server($this->getSource(), $this->getCache(), $this->getApi());
     $server->setSourcePathPrefix($this->getSourcePathPrefix());
     $server->setCachePathPrefix($this->getCachePathPrefix());
     $server->setBaseUrl($this->getBaseUrl());
     return $server;
 }
Example #2
0
 /**
  * Get configured server.
  * @return Server Configured Glide server.
  */
 public function getServer()
 {
     $server = new Server($this->getSource(), $this->getCache(), $this->getApi());
     $server->setSourcePathPrefix($this->getSourcePathPrefix());
     $server->setCachePathPrefix($this->getCachePathPrefix());
     $server->setDefaults($this->getDefaults());
     $server->setPresets($this->getPresets());
     $server->setBaseUrl($this->getBaseUrl());
     $server->setResponseFactory($this->getResponseFactory());
     return $server;
 }
Example #3
0
 /**
  * @return Server
  */
 public function getServer()
 {
     $server = new Server($this->getSource(), $this->getCache(), $this->getApi());
     if ($this->baseUrl !== null) {
         $server->setBaseUrl($this->baseUrl);
     }
     if ($this->sourcePathPrefix !== null) {
         $server->setSourcePathPrefix($this->sourcePathPrefix);
     }
     if ($this->cachePathPrefix !== null) {
         $server->setCachePathPrefix($this->cachePathPrefix);
     }
     return $server;
 }