コード例 #1
0
ファイル: StackedHttpKernel.php プロジェクト: evaneos/pyrite
 /**
  * Get a factory given a service name
  *
  * @param  string            $factoryName Service name to get factory from
  * @throws \RuntimeException Throws a exception if service does not implment HttpKernelFactory
  *
  * @return \Pyrite\Factory\HttpKernelFactory a factory for a service
  */
 private function getFactory($factoryName)
 {
     $factory = $this->container->get($factoryName);
     if (!$factory instanceof HttpKernelFactory) {
         throw new \RuntimeException(sprintf("Object of class %s does not implement Pyrite\\Factory\\HttpKernelFactory interface", get_class($factory)));
     }
     return $factory;
 }
コード例 #2
0
ファイル: PyriteKernel.php プロジェクト: vianneyb/pyrite
 private function configOnCrashOutput()
 {
     try {
         $this->uncaughtRenderer = $this->container->get("AppOnCrashHandler");
     } catch (\Exception $e) {
         $this->uncaughtRenderer = new \Pyrite\Exception\UncaughtExceptionRendererImpl(false);
     }
     return $this->uncaughtRenderer;
 }