This allows applications to add their own Horde_Form_Type_* classes
and have them be properly autoloaded. This is an interim solution only
until Horde_Form is refactored after 4.0 is released..
*/
function getType($type, $params = array())
{
- $type_class = 'Horde_Form_Type_' . $type;
+ if (strpos($type, ':') !== false) {
+ list($app, $type) = explode(':', $type);
+ $type_class = $app . '_Form_Type_' . $type;
+ } else {
+ $type_class = 'Horde_Form_Type_' . $type;
+ }
if (!class_exists($type_class)) {
throw new Horde_Exception(sprintf('Nonexistant class "%s" for field type "%s"', $type_class, $type));
}