本文整理汇总了PHP中sfApplicationConfiguration::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP sfApplicationConfiguration::initialize方法的具体用法?PHP sfApplicationConfiguration::initialize怎么用?PHP sfApplicationConfiguration::initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sfApplicationConfiguration
的用法示例。
在下文中一共展示了sfApplicationConfiguration::initialize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initialize
public function initialize()
{
parent::initialize();
if (!sfConfig::get('sf_cli') && false !== sfConfig::get('app_frontend_csrf_secret')) {
sfForm::enableCSRFProtection(sfConfig::get('app_frontend_csrf_secret'));
}
}
示例2: initialize
public function initialize()
{
parent::initialize();
// Register behavior's hooks
sfPropelBehavior::registerHooks('studentCareerSchoolYear', array(':save:pre' => array('StudentCareerSchoolYearBehavior', 'createStudentCareerSchoolYear')));
//sfPropelBehavior::registerHooks('examination', array(
// ':save:pre' => array('ExaminationBehavior', 'createExaminationSubjects'),
//));
sfPropelBehavior::registerHooks('examination_subject', array(':save:pre' => array('ExaminationSubjectBehavior', 'updateCourseSubjectStudentExaminations')));
sfPropelBehavior::registerHooks('examination_repproved_subject', array(':save:pre' => array('ExaminationRepprovedSubjectBehavior', 'updateStudentExaminationRepprovedSubjects')));
sfPropelBehavior::registerHooks('student_approved_career_subject', array(':save:post' => array('StudentApprovedCareerSubjectBehavior', 'graduateStudent')));
sfPropelBehavior::registerHooks('student_approved_course_subject', array(':save:post' => array('StudentRepprovedCourseSubjectBehavior', 'checkRepeatition')));
sfPropelBehavior::registerHooks('student_reincorporation_save', array(':save:post' => array('StudentReincorporationBehavior', 'updateReincorporation')));
sfPropelBehavior::registerHooks('student_reincorporation_delete', array(':delete:pre' => array('StudentReincorporationBehavior', 'deleteReincorporation')));
sfPropelBehavior::registerHooks('career_subject_school_year_update', array(':save:post' => array('CareerSubjectSchoolYearBehavior', 'updateCareerSubjectSchoolYear')));
sfPropelBehavior::registerHooks('person_delete', array(':delete:pre' => array('PersonBehavior', 'deletePerson')));
spl_autoload_register(array('ncFlavorAutoload', 'initialize'));
}
示例3: initialize
public function initialize()
{
parent::initialize();
sfConfig::set('app_etva_log', 'etva-centralmanagement.log');
sfConfig::set('app_clientsoap_log', 'clientsoap_messages.log');
/*
* setting soap messages log event
*/
sfConfig::set('app_virtsoap_log', 'virtsoap_messages.log');
$etva_logger = new sfFileLogger(new sfEventDispatcher(), array('file' => sfConfig::get("sf_log_dir") . '/' . sfConfig::get('app_etva_log')));
$clientsoap_logger = new sfFileLogger(new sfEventDispatcher(), array('file' => sfConfig::get("sf_log_dir") . '/' . sfConfig::get('app_clientsoap_log')));
//log soap messages
$soap_logger = new SoapFileLogger(new sfEventDispatcher(), array('file' => sfConfig::get("sf_log_dir") . '/' . sfConfig::get('app_virtsoap_log')));
//log system operations
$event_logger = new EtvaEventLogger(new sfEventDispatcher());
// Register our listeners
$this->dispatcher->connect(sfConfig::get("app_virtsoap_log"), array($soap_logger, 'listenToLogEvent'));
$this->dispatcher->connect(sfConfig::get("app_clientsoap_log"), array($clientsoap_logger, 'listenToLogEvent'));
$this->dispatcher->connect(sfConfig::get("app_etva_log"), array($etva_logger, 'listenToLogEvent'));
$this->dispatcher->connect("event.log", array($event_logger, "listenToLogEvent"));
}
示例4: initialize
/**
* Initialized the current configuration.
*/
public function initialize()
{
parent::initialize();
}