* @license PHP License * @package WB * @subpackage base */ /** * Class includer: Wombat * * Standard class loader * * @version 0.1.0 * @package WB * @subpackage base */ class WBClass_Loader_Wombat extends WBClass_Loader { /** * load named class * * @param string $clazz * @return bool true if class could be loaded */ public function load($clazz) { $clazz = substr($clazz, strlen($this->prefix)); $clazzFile = $this->param[1] . str_replace('_', '/', $clazz) . '.php'; foreach ($this->incDir as $dir) { $file = $dir . '/' . $clazzFile; if (!file_exists($file)) { continue; } include $file; return true; } return false; } } ?>