Esempio n. 1
0
 /**
  * Sets the value of a field.
  *
  * @param   string $name  The name of the field to set
  * @param   mixed  $value The value to set it to
  *
  * @return  void
  */
 public function setFieldValue($name, $value = null)
 {
     if (array_key_exists($name, $this->aliasFields)) {
         $name = $this->aliasFields[$name];
     }
     $method = Inflector::camelize('set_' . $name . '_attribute');
     if (method_exists($this, $method)) {
         $this->{$method}($value);
     } else {
         $this->recordData[$name] = $value;
     }
 }