public function _setAttributes($attributes)
    {
        if (is_array($attributes)) {
            foreach ($attributes as $attribute => $value) {
                $this->{$attribute} = $value;
            }

            return $this;
        }

        //@todo: put real exception here cos exception' gon be thrown either ways, so put one that makes sense
        //or something else that has more meaning
        throw new \InvalidArgumentException('Invalid argument Passed to set attributes on object');
    }
public function _setAttributes($attributes)
    {
        if (is_array($attributes)) {
            foreach ($attributes as $attribute => $value) {
                $this->{$attribute} = $value;
            }

            return $this;
        }

        //@todo: put real exception here cos exception' gon be thrown either ways, so put one that makes sense
        //or something else that has more meaning
        throw new \InvalidArgumentException('Invalid argument Passed to set attributes on object');
    }
public function _setAttributes ( $ attributes ) { if ( is_array ( $ attributes ) ) { foreach ( $ attributes as $ attribute => $ value ) { $ this -> { $ attribute } = $ value ; } return $ this ; } //@todo: put real exception here cos exception' gon be thrown either ways, so put one that makes sense //or something else that has more meaning throw new \ InvalidArgumentException ( 'Invalid argument Passed to set attributes on object' ) ; }
Set attributes of the model.

@param $attributes

@throws \Exception

@return $this
Set attributes of the model .