Exemplo n.º 1
0
 public static function create($name, $field, $properties = array(), $initial = Null)
 {
     // No late static binding as in PHP 5.3, otherwise we don't need
     // field and let user called BcForm_<Type> directly.
     $class_name = 'BcForm_' . BcForm::class_name($field);
     return new $class_name($name, $properties, $initial);
 }
Exemplo n.º 2
0
 public function add_field($name, $field, $properties = array(), $initial = Null)
 {
     $field_class_name = 'BcForm_' . BcForm::class_name($field);
     $this->fields[$name] = new $field_class_name($name, $properties, $initial);
 }