private function makeNames($actionName) { $className = Teeple_Util::capitalizedClassName($actionName); $ar = split('_', $actionName); $action = array_pop($ar); $basedir = MODULE_DIR . '/' . implode('/', $ar) . '/'; $classfile = $basedir . ucfirst($action) . ".php"; $templatefile = $basedir . $action . ".html"; $this->log->debug("classファイル: {$classfile}"); $this->log->debug("templateファイル: {$templatefile}"); return array($className, $classfile, $templatefile); }
/** * Actionを追加する * * @param string $name Actionのクラス名 */ public function add($name) { // Actionのクラス名をチェック if (!preg_match("/^[0-9a-zA-Z_]+\$/", $name)) { throw new Teeple_Exception("Actionクラス名が不正です。"); } // Actionクラスのインスタンス化 $className = Teeple_Util::capitalizedClassName($name); $action = $this->container->getPrototype($className); $base = 'Teeple_ActionBase'; if (!is_object($action) || !$action instanceof $base) { throw new Teeple_Exception("Actionクラスの生成に失敗しました。({$className})"); } array_push($this->_list, $action); return; }