public function addModification($mod = [])
    {
        if ($mod instanceof BatchModification) {
            $mod = $mod->get();
        }

        if ($this->isValidModification($mod)) {
            $this->modifications[] = $mod;

            return $this;
        }

        throw new InvalidArgumentException(
            "The batch modification array does not include the mandatory 'attrib' or 'modtype' keys."
        );
    }
public function addModification($mod = [])
    {
        if ($mod instanceof BatchModification) {
            $mod = $mod->get();
        }

        if ($this->isValidModification($mod)) {
            $this->modifications[] = $mod;

            return $this;
        }

        throw new InvalidArgumentException(
            "The batch modification array does not include the mandatory 'attrib' or 'modtype' keys."
        );
    }
public function addModification ( $ mod = [ ] ) { if ( $ mod instanceof BatchModification ) { $ mod = $ mod -> get ( ) ; } if ( $ this -> isValidModification ( $ mod ) ) { $ this -> modifications [ ] = $ mod ; return $ this ; } throw new InvalidArgumentException ( "The batch modification array does not include the mandatory 'attrib' or 'modtype' keys." ) ; }
Adds a batch modification to the models modifications array.

@param array|BatchModification $mod

@throws InvalidArgumentException

@return $this
Adds a batch modification to the models modifications array .