lib/Registry/Registry.php
public function registerService($name, $serviceId)
    {
        if (isset($this->serviceMap[$name])) {
            throw new \InvalidArgumentException(sprintf(
                '%s service "%s" is already registered',
                $this->serviceType, $name
            ));
        }

        $this->serviceMap[$name] = $serviceId;
        $this->services[$name] = null;
    }
public function registerService($name, $serviceId)
    {
        if (isset($this->serviceMap[$name])) {
            throw new \InvalidArgumentException(sprintf(
                '%s service "%s" is already registered',
                $this->serviceType, $name
            ));
        }

        $this->serviceMap[$name] = $serviceId;
        $this->services[$name] = null;
    }
public function registerService ( $ name , $ serviceId ) { if ( isset ( $ this -> serviceMap [ $ name ] ) ) { throw new \ InvalidArgumentException ( sprintf ( '%s service "%s" is already registered' , $ this -> serviceType , $ name ) ) ; } $ this -> serviceMap [ $ name ] = $ serviceId ; $ this -> services [ $ name ] = null ; }
Register a service ID with against the given name.

@param string $name
@param string $serviceId
Register a service ID with against the given name .