__construct() public method

Sets up the default logging mechanism.
public __construct ( array $params )
$params array A hash with parameters. The following are supported by the default implementation. Individual backends may support other parameters. - debug_dir: A directory to write debug output to. Must be writeable by the web server. - debug_files: If true, log all incoming and outgoing packets and data conversions and devinf log in debug_dir. - log_level: Only log entries with at least this level. Defaults to 'INFO'.
Exemplo n.º 1
0
 /**
  * Constructor.
  *
  * Initializes the logger.
  *
  * @param array $params  Any parameters the backend might need.
  */
 public function __construct($params)
 {
     parent::__construct($params);
     $this->_db = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Db')->create();
 }
Exemplo n.º 2
0
 /**
  * Constructor.
  *
  * @param array $params  A hash with parameters. In addition to those
  *                       supported by the Horde_SyncMl_Backend class one more
  *                       parameter is required for the database connection:
  *                       'dsn' => connection DSN.
  */
 public function __construct($params)
 {
     parent::__construct($params);
     $this->_db =& MDB2::connect($params['dsn']);
     if (is_a($this->_db, 'PEAR_Error')) {
         $this->logMessage($this->_db, 'ERR');
     }
 }