public function addBlame($blame)
    {
        if (!is_string($this->multiBlamesAttribute)) {
            return false;
        }
        $blameGuid = '';
        if (is_string($blame)) {
            $blameGuid = $blame;
        }
        if ($blame instanceof $this->multiBlamesClass) {
            $blameGuid = $blame->getGUID();
        }
        $blameGuids = $this->getBlameGuids(true);
        if (array_search($blameGuid, $blameGuids)) {
            throw new InvalidParamException('the blame has existed.');
        }
        if ($this->getBlamesCount() >= $this->blamesLimit) {
            throw new InvalidCallException("the limit($this->blamesLimit) of blames has been reached.");
        }
        $blameGuids[] = $blameGuid;
        $this->setBlameGuids($blameGuids);
        return $this->getBlameGuids();
    }
public function addBlame($blame)
    {
        if (!is_string($this->multiBlamesAttribute)) {
            return false;
        }
        $blameGuid = '';
        if (is_string($blame)) {
            $blameGuid = $blame;
        }
        if ($blame instanceof $this->multiBlamesClass) {
            $blameGuid = $blame->getGUID();
        }
        $blameGuids = $this->getBlameGuids(true);
        if (array_search($blameGuid, $blameGuids)) {
            throw new InvalidParamException('the blame has existed.');
        }
        if ($this->getBlamesCount() >= $this->blamesLimit) {
            throw new InvalidCallException("the limit($this->blamesLimit) of blames has been reached.");
        }
        $blameGuids[] = $blameGuid;
        $this->setBlameGuids($blameGuids);
        return $this->getBlameGuids();
    }
public function addBlame ( $ blame ) { if ( ! is_string ( $ this -> multiBlamesAttribute ) ) { return false ; } $ blameGuid = '' ; if ( is_string ( $ blame ) ) { $ blameGuid = $ blame ; } if ( $ blame instanceof $ this -> multiBlamesClass ) { $ blameGuid = $ blame -> getGUID ( ) ; } $ blameGuids = $ this -> getBlameGuids ( true ) ; if ( array_search ( $ blameGuid , $ blameGuids ) ) { throw new InvalidParamException ( 'the blame has existed.' ) ; } if ( $ this -> getBlamesCount ( ) >= $ this -> blamesLimit ) { throw new InvalidCallException ( "the limit($this->blamesLimit) of blames has been reached." ) ; } $ blameGuids [ ] = $ blameGuid ; $ this -> setBlameGuids ( $ blameGuids ) ; return $ this -> getBlameGuids ( ) ; }
Add specified blame.
@param {$this->multiBlamesClass}|string $blame
@return false|array
@throws InvalidParamException if blame existed.
@throws InvalidCallException if blame limit reached.
Add specified blame .