From: Ben Klang Date: Tue, 12 Jan 2010 20:25:37 +0000 (-0500) Subject: Operator: Add PHP5 class syntax X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=27a06cd4208d8990fefd946d39292c6f37f79071;p=horde.git Operator: Add PHP5 class syntax --- diff --git a/operator/lib/Driver.php b/operator/lib/Driver.php index 69ea0af2a..8069df817 100644 --- a/operator/lib/Driver.php +++ b/operator/lib/Driver.php @@ -23,7 +23,7 @@ class Operator_Driver { * actual call records. * @throws Operator_Exception */ - function getRecords($start, $end, $accountcode = null, $dcontext = null, + public function getRecords($start, $end, $accountcode = null, $dcontext = null, $rowstart = 0, $rowlimit = 100) { // Start Date @@ -74,7 +74,7 @@ class Operator_Driver { * statistics for calls placed that month. * @throws Operator_Exception|Horde_Date_Exception */ - function getMonthlyCallStats($start, $end, $accountcode = null, + public function getMonthlyCallStats($start, $end, $accountcode = null, $dcontext = null){ if (empty($accountcode) || $accountcode == '%') { $permentry = 'operator:accountcodes'; @@ -108,7 +108,7 @@ class Operator_Driver { * @return Operator_Driver The newly created concrete Operator_Driver * instance, or false on an error. */ - function factory($driver = null, $params = null) + public function factory($driver = null, $params = null) { if ($driver === null) { $driver = $GLOBALS['conf']['storage']['driver']; diff --git a/operator/lib/Driver/asterisksql.php b/operator/lib/Driver/asterisksql.php index f587766dd..80d50c5db 100644 --- a/operator/lib/Driver/asterisksql.php +++ b/operator/lib/Driver/asterisksql.php @@ -37,14 +37,14 @@ class Operator_Driver_asterisksql extends Operator_Driver { * * @var array */ - var $_params = array(); + protected $_params = array(); /** * Handle for the current database connection. * * @var DB */ - var $_db; + protected $_db; /** * Handle for the current database connection, used for writing. Defaults @@ -52,21 +52,21 @@ class Operator_Driver_asterisksql extends Operator_Driver { * * @var DB */ - var $_write_db; + protected $_write_db; /** * Boolean indicating whether or not we're connected to the SQL server. * * @var boolean */ - var $_connected = false; + protected $_connected = false; /** * Constructs a new SQL storage object. * * @param array $params A hash containing connection parameters. */ - function Operator_Driver_asterisksql($params = array()) + public function __construct($params = array()) { $this->_params = $params; } @@ -78,7 +78,7 @@ class Operator_Driver_asterisksql extends Operator_Driver { * actual call records. * @throws Operator_Exception|Horde_Date_Exception */ - function _getRecords($start, $end, $accountcode = null, $dcontext = null, + protected function _getRecords($start, $end, $accountcode = null, $dcontext = null, $rowstart = 0, $rowlimit = 100) { @@ -175,7 +175,7 @@ class Operator_Driver_asterisksql extends Operator_Driver { * statistics for calls placed that month. * @throws Operator_Exception|Horde_Date_Exception */ - function _getMonthlyCallStats($start, $end, $accountcode = null, + protected function _getMonthlyCallStats($start, $end, $accountcode = null, $dcontext = null) { if (!is_a($start, 'Horde_Date') || !is_a($end, 'Horde_Date')) { @@ -323,7 +323,7 @@ class Operator_Driver_asterisksql extends Operator_Driver { return $stats; } - function getAccountCodes() + public function getAccountCodes() { /* Make sure we have a valid database connection. */ $this->_connect(); @@ -345,7 +345,7 @@ class Operator_Driver_asterisksql extends Operator_Driver { * * @return boolean True on success; exits (Horde::fatal()) on error. */ - function _connect() + protected function _connect() { if ($this->_connected) { return true; @@ -414,7 +414,7 @@ class Operator_Driver_asterisksql extends Operator_Driver { * * @return boolean True on success, false on failure. */ - function _disconnect() + protected function _disconnect() { if ($this->_connected) { $this->_connected = false; diff --git a/operator/lib/Form/SearchCDR.php b/operator/lib/Form/SearchCDR.php index d54fc7059..261c73ec3 100644 --- a/operator/lib/Form/SearchCDR.php +++ b/operator/lib/Form/SearchCDR.php @@ -15,7 +15,7 @@ class SearchCDRForm extends Horde_Form { - function SearchCDRForm($title, &$vars) + public function __construct($title, &$vars) { parent::Horde_Form($vars, $title);