public function register($nickname, $object)
    {
        if (isset($this->autoInstantiations[$nickname]))
        {
            throw new DuplicateObjectException($nickname);
        }

        $this->autoInstantiations[$nickname] = $object;
    }
public function register($nickname, $object)
    {
        if (isset($this->autoInstantiations[$nickname]))
        {
            throw new DuplicateObjectException($nickname);
        }

        $this->autoInstantiations[$nickname] = $object;
    }
public function register ( $ nickname , $ object ) { if ( isset ( $ this -> autoInstantiations [ $ nickname ] ) ) { throw new DuplicateObjectException ( $ nickname ) ; } $ this -> autoInstantiations [ $ nickname ] = $ object ; }
Add an instance of a class to the registry

@param string $nickname The nickname for this object
@param mixed  $object   The object instance
Add an instance of a class to the registry