Zend Framework

Idea of Zend_Db_Select nested where clause

Zend Framework: 1.11.0 PHP: 5.3.3 なにしたかったの せっかくだからと本家に入れてもらう用の記事書いたけれど $adapter->quoteInto()を使う形が一番きれいな気がするw nestedWhere()はquoteInto()のラップだけして登録はwhere()を使うのがいいのかな。と…

Nested where clause on Zend_Db_Select

Zend Framework: 1.11.0 PHP: 5.3.3 目的 権限や表示属性を確認しつつ検索するWHERE句を持つSQLをZend_Db_Selectを使って作る。 簡単に書くと、以下の構造を持つSQLを作りたい。 SELECT * FROM table WHERE ( (データへのアクセス権チェック) AND (データの…

エラー処理を適当に作る

Zend Framework: 1.11.0 PHP:5.3.3 Zend_ExceptionはPHPのExceptionそのまま。 Zend/Exception.php class Zend_Exception extends Exception {} エラー発生時 Zend_Exceptionを投げておしまい。 throw new Zend_Exception('エラーメッセージ',エラーコード) …

Zend_Navigationでsitemap.xmlを作る

サイト構成は以下の通り(URL) / /sitemap.xml /grid/ configs/navigation.xml <route>default</route>を設定しないと Zend_NavigationはURLの生成にsitemap用のRouteを使用してしまう。 参考:http://framework.zend.com/issues/browse/ZF-6486 参考:http://zendframework.…

index.phpの置き場所と設定方法とURL

環境 Zend Framework: 1.11.0 rc1 ProjectRoot:/usr/share/project 設定ファイルはCentOSのルールによる 目的 Zend FrameworkのチュートリアルだとVirtualHostを使う設定になっている。*1 でも、、サブディレクトリで運用したいんだ。 http://www.example.jp…

1.11.0 rc1のzf.phpでエラーがでる

http://framework.zend.com/issues/browse/ZF-10592 PHP Warning: require_once(Zend/Tool/Framework/Provider/Initializable.php): failed to open stream: No such file or directory in /ZendFramework-1.11.0rc1-minimal/library/Zend/Tool/Project/Prov…