Ejemplo n.º 1
0
 /**
  *  get a field instance for the given name
  *  
  *  this will return any previously set field instance if it exists, if it doesn't
  *  then it will create a new one so it guarrantees to always return an mingo_field
  *  instance         
  *
  *  @param  string|array  $name the field's name   
  *  @return mingo_field
  */
 public function getField($name, $default_val = null)
 {
     $ret_instance = parent::getField($name, null);
     if ($ret_instance === null) {
         $ret_instance = new MingoField($name);
         $ret_instance->setDefaultVal($default_val);
     }
     //if
     return $ret_instance;
 }