Exemplo n.º 1
0
 public function __construct($serviceName, ContainerInterface $container)
 {
     if ($name = $container->name()) {
         $containerMessage = ' in the container "' . $name . '".';
     } else {
         $containerMessage = '. Additionally the container it was requested in was not registered.';
     }
     parent::__construct(sprintf('The service "%s" is not registered%s', $serviceName, $containerMessage));
 }
Exemplo n.º 2
0
 public function init(Di\ContainerInterface $container)
 {
     $container->template('routerTemplate');
 }
Exemplo n.º 3
0
 private function applyTypes(ContainerInterface $container, MethodReflector $method)
 {
     if ($method->getDocBlock()->hasTag(self::DOC_TAG_RETURN)) {
         $container->setTypes($method->getName(), $method->getDocBlock()->getTag(self::DOC_TAG_RETURN)->getTypes());
     }
 }