src/EnvironmentLoader.php
private function addDefinition($subNamespace, $objectType, $interface, $tag, array $arguments = [])
    {
        $class = sprintf($this->classPath, $subNamespace) . $subNamespace . $objectType;

        if (!class_exists($class)) {
            throw new \RuntimeException(sprintf('Class "%s" does not exists!', $class));
        }

        if (!in_array($interface, class_implements($class))) {
            throw new \RuntimeException(sprintf('Class "%s" must implement the "%s" interface!', $class, $interface));
        }

        $this->definitions[$tag] = new Definition($class, $arguments);
    }
private function addDefinition($subNamespace, $objectType, $interface, $tag, array $arguments = [])
    {
        $class = sprintf($this->classPath, $subNamespace) . $subNamespace . $objectType;

        if (!class_exists($class)) {
            throw new \RuntimeException(sprintf('Class "%s" does not exists!', $class));
        }

        if (!in_array($interface, class_implements($class))) {
            throw new \RuntimeException(sprintf('Class "%s" must implement the "%s" interface!', $class, $interface));
        }

        $this->definitions[$tag] = new Definition($class, $arguments);
    }
private function addDefinition ( $ subNamespace , $ objectType , $ interface , $ tag , array $ arguments = [ ] ) { $ class = sprintf ( $ this -> classPath , $ subNamespace ) . $ subNamespace . $ objectType ; if ( ! class_exists ( $ class ) ) { throw new \ RuntimeException ( sprintf ( 'Class "%s" does not exists!' , $ class ) ) ; } if ( ! in_array ( $ interface , class_implements ( $ class ) ) ) { throw new \ RuntimeException ( sprintf ( 'Class "%s" must implement the "%s" interface!' , $ class , $ interface ) ) ; } $ this -> definitions [ $ tag ] = new Definition ( $ class , $ arguments ) ; }
Add dependency definition for DI container.

@param string $subNamespace
@param string $objectType
@param string $interface
@param string $tag
@param array $arguments
Add dependency definition for DI container .