Esempio n. 1
0
 /**
  * Selects the default value from the choices if NULLs are not allowed, but
  * the given value is NULL.
  *
  * This is intended to mimic the way MySQL selects the default value if
  * nothing is given.
  *
  * @param   mixed  $value
  * @return  string
  */
 public function set($value)
 {
     if ($value === NULL and !$this->allow_null) {
         // Set value to the default value
         $value = $this->default;
     }
     return parent::set($value);
 }