Exemplo n.º 1
0
 /**
  * This initializes the plugin.
  *
  * This function is called by \Sabre\DAV\Server, after
  * addPlugin is called.
  *
  * This method should set up the required event subscriptions.
  *
  * @param \Sabre\DAV\Server $server
  * @return void
  */
 public function initialize(\Sabre\DAV\Server $server)
 {
     $this->server = $server;
     $this->server->on('beforeMethod', array($this, 'checkMaintenanceMode'), 1);
 }
Exemplo n.º 2
0
 /**
  * @param Server $server
  * @param Request $request
  * @return \Sabre\HTTP\Response
  */
 protected function makeRequest(Server $server, Request $request)
 {
     $sapi = new Sapi($request);
     $server->sapi = $sapi;
     $server->httpRequest = $request;
     $server->exec();
     return $sapi->getResponse();
 }