facebook twitter hatena line email

Php/zend framework/zend application

提供: 初心者エンジニアの簡易メモ
移動: 案内検索

Applicationのconfig受け渡し時に処理をかます。

  • 通常
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);
  • 別の処理をかます場合
$application = new Zend_Application(
    APPLICATION_ENV,
    new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', APPLICATION_ENV)
);

application.iniサンプル

[production]
phpSettings.date.timezone = "Asia/Tokyo"
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
phpSettings.log_errors = 1
phpSettings.error_log = APPLICATION_PATH "/../var/error.log"
[staging : production]
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1