2006年11月アーカイブ

開発環境では、設定は毎回再読み込みされるが、autoloadされるクラスは再読み込みされないので、libのクラスファイルを追加変更した場合は、clear-cacheする必要がある。

カテゴリー:

getterで取得した日付のフォーマット
strftime('%Y-%m-%dT%H:%M:%SZ', $question->getCreatedAt('U'))

カテゴリー:

methods:
post: [name, email]
※角括弧([])内にパラメータ名をリストする!

カテゴリー:

php.iniに以下を追加。
zend_extension_ts="d:/php5/ext/php_xdebug.dll"
http://xdebug.org/install.php

※symfonyのドキュメントでは
extension=php_xdebug.dll
とあるが、これだとsymfonyコマンドで以下のワーニングが出る。
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
※zend optimizorとの互換性に注意

http://www.symfony-project.com/book/trunk/debug

カテゴリー:

phingのインストール
pear channel-discover pear.phing.info
(pear config-set preferred_state beta)
pear install phing/phing

http://shiro.exbridge.info/archives/50699333.html

カテゴリー:

symfony-0.6.3にsfFeedをインストールするには、
pluginのtracからsfFeed/libのクラスファイルをダウンロードして、/lib/plugins/symfony/plugins/sfFeed/
にコピーする。
または、
symfony plugin-install local symfony/sfFeed-1.0.0
でもインストールできるが、これは古いバージョンなのでバグがある。(itemのURLが正しくセットされない。)

カテゴリー:

Here is what I did to install SimpleTest:

pear channel-discover pear.phpkitchen.com
pear install phpkitchen/simpletest-alpha

This will install it in ${pear_dir}/SimpleTest but symfony expect simpletest to be installed in ${pear_dir}/simpletest (lowercase).
So I simply made a symlink like this:
cd ${pear_dir}
ln -s SimpleTest simpletest

This alpha version is working fine with php v5.1.6 and symfony v0.7.1914

カテゴリー:

$sf_context //the whole context object
$sf_request //the origin request
$sf_params //parameters of the origin request
$sf_user //the current sfUser object
$sf_view //the calling sfView object

カテゴリー:

<?php echo link_to('login page', '@login') ?>

こういうのを、相対パスではなく絶対パスにする(メール送信時などに)

optionsにabsoluteを指定する
<?php echo link_to('login page', '@login', 'absolute=true') ?>

http://www.symfony-project.com/api/symfony/helper/UrlHelper.html#method_link_to

url_forの場合は第2引数がabsolute指定
(string) url_for ($internal_uri, $absolute = false)

http://www.symfony-project.com/api/symfony/helper/UrlHelper.html#method_url_for
http://www.symfony-project.com/api/symfony/request/sfWebRequest.html#method_geturiprefix

カテゴリー: