Ejemplo n.º 1
0
 public function enableSsl()
 {
     $this->share('handler.https', function () {
         $handler = new SslHttpHandler($this['handler.options']);
         $handler->setLogger($this->get('logger'));
         foreach ($this->getTaggedServices('processor') as $processor) {
             $handler->addProcessor($processor);
         }
         return $handler;
     });
     $this->share('server.https', function () {
         $server = new SslHttpServer($this->get('handler.https'));
         return $server->listen($this['address.https']);
     }, ['server']);
 }