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'));
     }
 }
 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
0
 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"));
 }
 /**
  * Initialized the current configuration.
  */
 public function initialize()
 {
     parent::initialize();
 }