コード例 #1
0
 /**
  * Initializes this logger.
  *
  * Available options:
  *
  * - web_debug_class: The web debug class (sfWebDebug by default).
  *
  * @param  sfEventDispatcher $dispatcher  A sfEventDispatcher instance
  * @param  array             $options     An array of options.
  *
  * @return Boolean           true, if initialization completes successfully, otherwise false.
  *
  * @see sfVarLogger
  */
 public function initialize(sfEventDispatcher $dispatcher, $options = array())
 {
     $this->context = sfContext::getInstance();
     $this->dispatcher = $dispatcher;
     $this->webDebugClass = isset($options['web_debug_class']) ? $options['web_debug_class'] : 'sfWebDebug';
     if (sfConfig::get('sf_web_debug')) {
         $dispatcher->connect('response.filter_content', array($this, 'filterResponseContent'));
     }
     return parent::initialize($dispatcher, $options);
 }
コード例 #2
0
 /**
  * Initializes this logger.
  *
  * Available options:
  *
  *  * web_debug_class: The web debug class (sfWebDebug by default)
  *
  * @param  sfEventDispatcher $dispatcher  A sfEventDispatcher instance
  * @param  array             $options     An array of options.
  *
  * @return Boolean           true, if initialization completes successfully, otherwise false.
  *
  * @see sfVarLogger
  */
 public function initialize(sfEventDispatcher $dispatcher, $options = array())
 {
     $this->context = sfContext::getInstance();
     $this->webDebugClass = isset($options['web_debug_class']) ? $options['web_debug_class'] : 'sfWebDebug';
     if (sfConfig::get('sf_web_debug')) {
         $dispatcher->connect('context.load_factories', array($this, 'listenForLoadFactories'));
         $dispatcher->connect('response.filter_content', array($this, 'filterResponseContent'));
     }
     $this->registerErrorHandler();
     return parent::initialize($dispatcher, $options);
 }
コード例 #3
0
ファイル: sfFirePHPLogger.php プロジェクト: vcgato29/poff
 public function initialize(sfEventDispatcher $dispatcher, $options = array())
 {
     $this->sfFire = sfFirePHP::getInstance(true);
     if (isset($options['processor'])) {
         sfFirePHP::setProcessor($options['processor'] . '?' . time());
     }
     if (isset($options['renderer'])) {
         sfFirePHP::setRenderer($options['renderer'] . '?' . time());
     }
     $dispatcher->connect('response.filter_content', array($this, 'filterResponseContent'));
     $this->dispatcher = $dispatcher;
     return parent::initialize($dispatcher, $options);
 }