$rowClass)); parent::__construct($config); } public function getForm($form = null) { $form = ucfirst(strtolower($form)); if ($form == null) { $form = self::DEFAULT_FORM; } $className = "Form_" . ucfirst($this->_name) . '_' . $form; if (array_key_exists($className, self::$_loadedForms)) { return self::$_loadedForms[$className]; } if (class_exists($className, true)) { self::$_loadedForms[$className] = new $className; return self::$_loadedForms[$className]; } else { throw new Libs_Exception("Class $className not found"); } } public function __call($meth, $args) { if (preg_match('|get(\w+)Form|', $meth, $matches)) { return $this->getForm($matches[1]); } } } ?>