private function _resolveService($className) {
        $serviceDependencies = $this->_serviceDependencyErrorCheck($className);
        if (empty($serviceDependencies)) {
            return $this->_instanciateService($className, []);
        } else {
            $di = [];
            foreach ($serviceDependencies as $dependency) {
                //set $di[] with all dependencies and invoke
                $di[] = $this->_resolveService($dependency);
            }
            return $this->_instanciateService($className, $di);
        }
    }
private function _resolveService($className) {
        $serviceDependencies = $this->_serviceDependencyErrorCheck($className);
        if (empty($serviceDependencies)) {
            return $this->_instanciateService($className, []);
        } else {
            $di = [];
            foreach ($serviceDependencies as $dependency) {
                //set $di[] with all dependencies and invoke
                $di[] = $this->_resolveService($dependency);
            }
            return $this->_instanciateService($className, $di);
        }
    }
private function _resolveService ( $ className ) { $ serviceDependencies = $ this -> _serviceDependencyErrorCheck ( $ className ) ; if ( empty ( $ serviceDependencies ) ) { return $ this -> _instanciateService ( $ className , [ ] ) ; } else { $ di = [ ] ; foreach ( $ serviceDependencies as $ dependency ) { //set $di[] with all dependencies and invoke $ di [ ] = $ this -> _resolveService ( $ dependency ) ; } return $ this -> _instanciateService ( $ className , $ di ) ; } }
This method is used to resolve a service and all of its dependencies.
@param $className The classname of the service you would like to resolve.
@return mixed The resolved service.
This method is used to resolve a service and all of its dependencies .