示例#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);
 }
示例#2
0
文件: BcForm.php 项目: k4ml/BcForm
 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);
 }