2006-11-15から1日間の記事一覧

リクエストヘッダの取得

リクエストヘッダを取得するため、Moony_Request::getHeader()メソッドを実装した。 例えば、アクションクラス内で以下のようにするとUserAgentが取得できる。 $user_agent = $this->request->getHeader('User-Agent');$_SERVER['HTTP_USER_AGENT']から値を…

もっと自動生成

PEAR::Console_Getoptを利用して自動生成ツールを刷新。 コマンドラインオプションを用意してみた: Usage: moony [options] <action_name> ... 'Foo' generates: - actions/Foo.php ......... the action class - templates/foo.php ....... the template file 'Foo_Bar' </action_name>…

ディレクトリ構成

自動生成で作成されるディレクトリ構成を変えようと思う。 /path/to/project /htdocs index.php [entry point] /webapp /actions Index.php [action class] /templates index.php [template file] 公開されるべき"htdocs"と、公開の必要がない"webapp"を分け…