/** * 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; }
private function configOnCrashOutput() { try { $this->uncaughtRenderer = $this->container->get("AppOnCrashHandler"); } catch (\Exception $e) { $this->uncaughtRenderer = new \Pyrite\Exception\UncaughtExceptionRendererImpl(false); } return $this->uncaughtRenderer; }