Copyright 2003-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Author: Marko Djukic (marko@oblo.com)
Ejemplo n.º 1
0
 public function __construct($params)
 {
     parent::__construct($params);
     $this->_states = Hylax::getStates();
     $this->_stat_cols = Hylax::getStatCols();
     $this->_cmd = array('sendfax' => '/usr/bin/sendfax');
 }
Ejemplo n.º 2
0
 protected function _init()
 {
     global $conf;
     /* Hylax Driver */
     $this->gateway = Hylax_Driver::singleton($conf['fax']['driver'], $conf['fax']['params']);
     /* Hylax storage driver. */
     $this->storage = Hylax_Storage::singleton('sql', $conf['sql']);
 }
Ejemplo n.º 3
0
 /**
  * Attempts to return a reference to a concrete Hylax_Driver instance
  * based on $driver. It will only create a new instance if no
  * Hylax_Driver instance with the same parameters currently exists.
  *
  * This should be used if multiple storage sources are required.
  *
  * This method must be invoked as: $var = &Hylax_Driver::singleton()
  *
  * @param string $driver  The type of concrete Hylax_Driver subclass to
  *                        return.
  * @param array $params   A hash containing any additional configuration or
  *                        connection parameters a subclass might need.
  *
  * @return mixed  The created concrete Hylax_Driver instance, or false on
  *                error.
  */
 public function &singleton($driver = null, $params = null)
 {
     static $instances;
     if (is_null($driver)) {
         $driver = $GLOBALS['conf']['fax']['driver'];
     }
     if (!isset($instances)) {
         $instances = array();
     }
     $signature = serialize(array($driver, $params));
     if (!isset($instances[$signature])) {
         $instances[$signature] =& Hylax_Driver::factory($driver, $params);
     }
     return $instances[$signature];
 }
Ejemplo n.º 4
0
 public function __construct($params)
 {
     parent::__construct($params);
     $this->_states = Hylax::getStates();
     $this->_stat_cols = Hylax::getStatCols();
 }