ファイルを".php"で読む
というわけででっちあげパッチ
function _makeFileName($basename, $actionPath, $className, $check) { $_base_path = MODULE_DIR . "/${actionPath}/"; $filename = $_base_path .$basename.".php"; if ($this->_existFile($filename) || !$check) return $filename; $filename = $_base_path .$basename.".class.php"; if ($this->_existFile($filename)) return $filename; $filename = $_base_path .$className.".class.php"; if ($this->_existFile($filename)) return $filename; return null; } function _existFile($filename) { if (!@file_exists($filename)) { return false; } else { return true; } }
というメソッドを"maple/core/ActionChain.class.php"に足してみる.
んでもって,同じくActionChain.class.phpの"makeNames"メソッドに以下のパッチを当ててみる.
- $filename = MODULE_DIR . "/${actionPath}/${basename}.class.php"; + $filename = $this->_makeFileName($basename, $actionPath, $className, $check);
これで一応は,動いた.
ちなみにソースを見てみるとgenerator内部でも上の"makeName"メソッドを使ってるので,生成時にもデフォルトでは,"*.php"に!
ちょっとファイル名決めてるとこがださい気がするけど,気のせい(。∀゚)