/** * Add a rule to a column * * @return void * @author Justin Palmer **/ public function rule($column, Rule $rule) { //Make sure the property exists. $this->model->hasProperty($column); if ($rule instanceof RequiredRule) { $this->required[] = $column; } //Get the rules for this property. $rules = $this->rules->get($column); if ($rules === null) { $rules = array(); } $rules[] = $rule; $this->rules->set($column, $rules); }
public function setRawProperty($name, $value) { if (parent::hasProperty($name)) { return parent::setRawProperty($name, $value); } $this->backupIfChanging($name, $this->getVariableValue($name), $value); $this->_variable_values[$name] = $value; }