private function doInject() {
        foreach ($this->prepareInject() as $alias => $classArray) {
            if (!is_array($classArray)) {
                throw new \Exception('Injection failed. Values of injection array in class "' .
                $this->getClass() . '" must be an array');
            }

            if (!isset($classArray['class'])) {
                throw new \Exception('Injection failed. Class not specified for injection for alias "' .
                $alias . '" in class "' . $this->getClass() . '"');
            }

            if (!class_exists($classArray['class'])) {
                throw new \Exception('Injection failed. Class "' . $classArray['class'] . '" with alias "' .
                $alias . '" does not exist in class "' . $this->getClass() . '"');
            }

            if (isset($classArray['params']) && !is_array($classArray['params'])) {
                $classArray['params'] = array($classArray['params']);
            }

            if (FALSE === ($class = $this->canInject($classArray))) {
                throw new \Exception('Injection failed. Unending injection cycle detected for class "' .
                $classArray['class'] . '" with alias "' . $alias . '" in "' . $this->getClass() . '"' . $this->parseInjected());
            }

            $this->$alias = $class;
        }
    }
private function doInject() {
        foreach ($this->prepareInject() as $alias => $classArray) {
            if (!is_array($classArray)) {
                throw new \Exception('Injection failed. Values of injection array in class "' .
                $this->getClass() . '" must be an array');
            }

            if (!isset($classArray['class'])) {
                throw new \Exception('Injection failed. Class not specified for injection for alias "' .
                $alias . '" in class "' . $this->getClass() . '"');
            }

            if (!class_exists($classArray['class'])) {
                throw new \Exception('Injection failed. Class "' . $classArray['class'] . '" with alias "' .
                $alias . '" does not exist in class "' . $this->getClass() . '"');
            }

            if (isset($classArray['params']) && !is_array($classArray['params'])) {
                $classArray['params'] = array($classArray['params']);
            }

            if (FALSE === ($class = $this->canInject($classArray))) {
                throw new \Exception('Injection failed. Unending injection cycle detected for class "' .
                $classArray['class'] . '" with alias "' . $alias . '" in "' . $this->getClass() . '"' . $this->parseInjected());
            }

            $this->$alias = $class;
        }
    }
private function doInject ( ) { foreach ( $ this -> prepareInject ( ) as $ alias => $ classArray ) { if ( ! is_array ( $ classArray ) ) { throw new \ Exception ( 'Injection failed. Values of injection array in class "' . $ this -> getClass ( ) . '" must be an array' ) ; } if ( ! isset ( $ classArray [ 'class' ] ) ) { throw new \ Exception ( 'Injection failed. Class not specified for injection for alias "' . $ alias . '" in class "' . $ this -> getClass ( ) . '"' ) ; } if ( ! class_exists ( $ classArray [ 'class' ] ) ) { throw new \ Exception ( 'Injection failed. Class "' . $ classArray [ 'class' ] . '" with alias "' . $ alias . '" does not exist in class "' . $ this -> getClass ( ) . '"' ) ; } if ( isset ( $ classArray [ 'params' ] ) && ! is_array ( $ classArray [ 'params' ] ) ) { $ classArray [ 'params' ] = array ( $ classArray [ 'params' ] ) ; } if ( FALSE === ( $ class = $ this -> canInject ( $ classArray ) ) ) { throw new \ Exception ( 'Injection failed. Unending injection cycle detected for class "' . $ classArray [ 'class' ] . '" with alias "' . $ alias . '" in "' . $ this -> getClass ( ) . '"' . $ this -> parseInjected ( ) ) ; } $ this -> $ alias = $ class ; } }
Performs the actual injection
@throws \Exception
Performs the actual injection