2009-11-01から1ヶ月間の記事一覧

[php][emacs] php-completion.el の補完にSPLクラスを追加

とりあえず補完されればいいのでfunctionsに追加。(classesがなさそう) ;; SPLクラスの補完追加 (phpcmp-db-update 'functions '( "AppendIterator" "ArrayIterator" "ArrayObject" "BadFunctionCallException" "BadMethodCallException" "CachingIterator…

[symfony][propel][mysql] symfony 1.2 の sfPropelPager で MySQL 行カウント SQL_CALC_FOUND_ROWS を使う

http://ossipedia.ipa.go.jp/capacity/EV0603280115/ addDescendingOrderByColumn(ArticlePeer::CREATED_AT); $pager = new myPropelPager('Article', 10); $pager->setCriteria($c); $pager->setPage($page); //$pager->init(); // COUNT $pager->initFound…

symfony 1.2のsfTesterResponseクラスを日本語に対応させる

check('/', 'テスト')-> with('response')->matches('/\w+の日記/u'); tester->like( $this->getContent(), '/' . preg_quote($text, '/') . '/u', sprintf('response contains "%s"', mb_substr($text, 0, 4…

symfony 1.2で携帯用にSJISで出力する際の注意点

フィルタでSJISに変換して出力している場合、 view.yml で以下のように設定して default: http_metas: content-type: application/xhtml+xml; charset=Shift_JIS テンプレート内で以下のようにするとタイトルが空になる。 sfWebResponse::fixContentType() …