private function _registerService($className, $constructorType) {
        if (!class_exists($className)) {
            $errorMsg = sprintf(self::ERROR_CLASS_NOT_FOUND, $className);
            throw new ulfberhtException($errorMsg);
        } elseif ($this->has($className)) {
            $errorMsg = sprintf(self::ERROR_CLASS_ALREADY_DEFINED, $className);
            throw new ulfberhtException($errorMsg);
        }

        $this->_services[$className] = new serviceWrapper(
            $className,
            $constructorType
        );
        $this->_serviceDependencyGraph->addResource($className);
        $this->_serviceDependencyGraph->addDependencies(
            $className,
            $this->_services[$className]->dependencies
        );
    }
private function _registerService($className, $constructorType) {
        if (!class_exists($className)) {
            $errorMsg = sprintf(self::ERROR_CLASS_NOT_FOUND, $className);
            throw new ulfberhtException($errorMsg);
        } elseif ($this->has($className)) {
            $errorMsg = sprintf(self::ERROR_CLASS_ALREADY_DEFINED, $className);
            throw new ulfberhtException($errorMsg);
        }

        $this->_services[$className] = new serviceWrapper(
            $className,
            $constructorType
        );
        $this->_serviceDependencyGraph->addResource($className);
        $this->_serviceDependencyGraph->addDependencies(
            $className,
            $this->_services[$className]->dependencies
        );
    }
private function _registerService ( $ className , $ constructorType ) { if ( ! class_exists ( $ className ) ) { $ errorMsg = sprintf ( self :: ERROR_CLASS_NOT_FOUND , $ className ) ; throw new ulfberhtException ( $ errorMsg ) ; } elseif ( $ this -> has ( $ className ) ) { $ errorMsg = sprintf ( self :: ERROR_CLASS_ALREADY_DEFINED , $ className ) ; throw new ulfberhtException ( $ errorMsg ) ; } $ this -> _services [ $ className ] = new serviceWrapper ( $ className , $ constructorType ) ; $ this -> _serviceDependencyGraph -> addResource ( $ className ) ; $ this -> _serviceDependencyGraph -> addDependencies ( $ className , $ this -> _services [ $ className ] -> dependencies ) ; }
Registers a new service into ulfberht.
@param string $className The class name you would like to register
@param string $constructorType The constructor type
@return void
Registers a new service into ulfberht .