* @package WB */ /** * Class includer: PHPOffice * * Load for PHPOffice * * @version 0.1.0 * @package WB */ class WBClass_Loader_PHPOffice extends WBClass_Loader { /** * Load named class * * Classes are separated in folders for namespaces * * @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; } }