I have a base class called field and classes that extend this class such as text, select, radio, checkbox, <
field
text
select
radio
checkbox
You can also use reflection, $class = new ReflectionClass($class_name); $instance = $class->newInstance(arg1, arg2, ...);
$class = new ReflectionClass($class_name); $instance = $class->newInstance(arg1, arg2, ...);