function giveIdentity(iIdentity $identity)
    {
        if ($this->identity)
            throw new \Exception('Identity is immutable.');
        
        $defIdentity = $this->_newDefaultIdentity();
        $defIdentity->import($identity);
        if (!$defIdentity->isFulfilled())
            throw new \InvalidArgumentException(sprintf(
                'Identity (%s) not fulfillment (%s).'
                , \Poirot\Std\flatten($identity)
                , \Poirot\Std\flatten($defIdentity)
            ));
        
        $this->identity = $defIdentity;
        return $this;
    }
function giveIdentity(iIdentity $identity)
    {
        if ($this->identity)
            throw new \Exception('Identity is immutable.');
        
        $defIdentity = $this->_newDefaultIdentity();
        $defIdentity->import($identity);
        if (!$defIdentity->isFulfilled())
            throw new \InvalidArgumentException(sprintf(
                'Identity (%s) not fulfillment (%s).'
                , \Poirot\Std\flatten($identity)
                , \Poirot\Std\flatten($defIdentity)
            ));
        
        $this->identity = $defIdentity;
        return $this;
    }
function giveIdentity ( iIdentity $ identity ) { if ( $ this -> identity ) throw new \ Exception ( 'Identity is immutable.' ) ; $ defIdentity = $ this -> _newDefaultIdentity ( ) ; $ defIdentity -> import ( $ identity ) ; if ( ! $ defIdentity -> isFulfilled ( ) ) throw new \ InvalidArgumentException ( sprintf ( 'Identity (%s) not fulfillment (%s).' , \ Poirot \ Std \ flatten ( $ identity ) , \ Poirot \ Std \ flatten ( $ defIdentity ) ) ) ; $ this -> identity = $ defIdentity ; return $ this ; }
Set Immutable Identity

@param iIdentity $identity

@return $this
@throws \Exception immutable error; identity not met requirement
Set Immutable Identity