src/Titon/Model/Model.php
public function fill(array $data) {
        if ($this->isFullyGuarded()) {
            throw new MassAssignmentException(sprintf('Cannot assign attributes as %s is locked', get_class($this)));
        }

        foreach ($data as $key => $value) {
            if ($this->isFillable($key) && !$this->isGuarded($key)) {
                $this->set($key, $value);
            }
        }

        return $this;
    }
public function fill(array $data) {
        if ($this->isFullyGuarded()) {
            throw new MassAssignmentException(sprintf('Cannot assign attributes as %s is locked', get_class($this)));
        }

        foreach ($data as $key => $value) {
            if ($this->isFillable($key) && !$this->isGuarded($key)) {
                $this->set($key, $value);
            }
        }

        return $this;
    }
public function fill ( array $ data ) { if ( $ this -> isFullyGuarded ( ) ) { throw new MassAssignmentException ( sprintf ( 'Cannot assign attributes as %s is locked' , get_class ( $ this ) ) ) ; } foreach ( $ data as $ key => $ value ) { if ( $ this -> isFillable ( $ key ) && ! $ this -> isGuarded ( $ key ) ) { $ this -> set ( $ key , $ value ) ; } } return $ this ; }
Fill the model with data to be sent to the database layer.

@param array $data
@return \Titon\Model\Model
@throws \Titon\Model\Exception\MassAssignmentException
Fill the model with data to be sent to the database layer .