*/
class Hylax_Driver {
- var $_params;
+ protected $_params;
- function Hylax_Driver($params)
+ public function __construct($params)
{
global $conf;
$this->_params = $params;
}
- function getFolder($folder, $path = null)
+ public function getFolder($folder, $path = null)
{
return $this->_getFolder($folder, $path);
}
* @return Hylax_Driver The newly created concrete Hylax_Driver
* instance, or false on error.
*/
- function &factory($driver = null, $params = null)
+ public function &factory($driver = null, $params = null)
{
if (is_null($driver)) {
$driver = $GLOBALS['conf']['fax']['driver'];
* @return mixed The created concrete Hylax_Driver instance, or false on
* error.
*/
- function &singleton($driver = null, $params = null)
+ public function &singleton($driver = null, $params = null)
{
static $instances;
var $_stat_cols = array();
var $_cmd = array();
- function Hylax_Driver_hylafax($params)
+ public function __construct($params)
{
parent::Hylax_Driver($params);
$this->_cmd = array('sendfax' => '/usr/bin/sendfax');
}
- function send($number, $data, $time = null)
+ public function send($number, $data, $time = null)
{
$command = sprintf('%s -n -d %s',
$this->_cmd['sendfax'],
return PEAR::raiseError(sprintf(_("Could not send fax. %s"), $output));
}
- function numFaxesIn()
+ public function numFaxesIn()
{
//$inbox = $this->getInbox();
//return count($inbox);
}
- function numFaxesOut()
+ public function numFaxesOut()
{
//$outbox = $this->getOutbox();
//return count($outbox);
}
- function getInbox()
+ public function getInbox()
{
return $this->_getFolder('inbox');
}
- function _getFolder($folder, $path = null)
+ public function _getFolder($folder, $path = null)
{
switch ($folder) {
case 'inbox':
}
}
- function getJob($job_id, $folder, $path = null)
+ public function getJob($job_id, $folder, $path = null)
{
global $conf;
return $job;
}
- function getStatus($job_id)
+ public function getStatus($job_id)
{
static $send_q = array();
static $done_q = array();
return '';
}
- function _getParseSendJob($filename)
+ protected function _getParseSendJob($filename)
{
$job = array();
$job_file = file_get_contents($filename);
return $job;
}
- function getThumbs($job_id, $ps)
+ public function getThumbs($job_id, $ps)
{
if ($this->_vfs->exists(HYLAX_VFS_PATH, $job_id)) {
/* Return thumb image list. */
return array_keys($images);
}
- function imagesToVFS($job_id, $ps)
+ public function imagesToVFS($job_id, $ps)
{
global $conf;
return $this->_vfs->listFolder(HYLAX_VFS_PATH . '/' . $job_id, 'doc.png');
}
- function _exec($cmd, $input = '')
+ protected function _exec($cmd, $input = '')
{
$spec = array(//0 => array('pipe', 'r'),
1 => array('pipe', 'w'),
return $result;
}
- function _parseFaxStat($result)
+ protected function _parseFaxStat($result)
{
$out = array();
$i = 0;
*/
class Hylax_Driver_spandsp extends Hylax_Driver {
- var $_states = array();
- var $_stat_cols = array();
- var $_cmd = array();
+ protected $_states = array();
+ protected $_stat_cols = array();
+ protected $_cmd = array();
- function Hylax_Driver_spandsp($params)
+ public function __construct($params)
{
parent::Hylax_Driver($params);
$this->_stat_cols = Hylax::getStatCols();
}
- function send($number, $data, $time = null)
+ public function send($number, $data, $time = null)
{
/* Create a temporary file. */
$filename = sprintf("%s.fax", Horde::getTempFile('hylax'));
return $this->createCallFile($filename);
}
- function createCallFile($filename)
+ public function createCallFile($filename)
{
global $conf;
return PEAR::raiseError(sprintf(_("Could not send fax. %s"), $output));
}
- function numFaxesIn()
+ public function numFaxesIn()
{
//$inbox = $this->getInbox();
//return count($inbox);
}
- function numFaxesOut()
+ public function numFaxesOut()
{
//$outbox = $this->getOutbox();
//return count($outbox);
}
- function getInbox()
+ public function getInbox()
{
// return $this->_getFolder('inbox');
}
- function _getFolder($folder, $path = null)
+ protected function _getFolder($folder, $path = null)
{
switch ($folder) {
case 'inbox':
}
}
- function getJob($job_id, $folder, $path = null)
+ public function getJob($job_id, $folder, $path = null)
{
global $conf;
return $job;
}
- function getStatus($job_id)
+ public function getStatus($job_id)
{
return null;
}
- function getThumbs($job_id, $ps)
+ public function getThumbs($job_id, $ps)
{
if ($this->_vfs->exists(HYLAX_VFS_PATH, $job_id)) {
/* Return thumb image list. */
return array_keys($images);
}
- function imagesToVFS($job_id, $ps)
+ public function imagesToVFS($job_id, $ps)
{
global $conf;
return $this->_vfs->listFolder(HYLAX_VFS_PATH . '/' . $job_id, 'doc.png');
}
- function _exec($cmd, $input = '')
+ protected function _exec($cmd, $input = '')
{
$spec = array(//0 => array('pipe', 'r'),
1 => array('pipe', 'w'),