*
* @access public
*/
- function setOptions(&$db, $options)
+ static function setOptions(&$db, $options)
{
if (is_array($options)) {
foreach ($options as $option => $value) {
* @static
* @access public
*/
- function classExists($classname)
+ static function classExists($classname)
{
if (version_compare(phpversion(), "5.0", ">=")) {
return class_exists($classname, false);
*
* @access public
*/
- function loadClass($class_name, $debug)
+ static function loadClass($class_name, $debug)
{
if (!MDB2::classExists($class_name)) {
$file_name = str_replace('_', DIRECTORY_SEPARATOR, $class_name).'.php';
*
* @access public
*/
- function &factory($dsn, $options = false)
+ static function factory($dsn, $options = false)
{
$dsninfo = MDB2::parseDSN($dsn);
if (empty($dsninfo['phptype'])) {
return $err;
}
- $db =& new $class_name();
+ $db =new $class_name();
$db->setDSN($dsninfo);
$err = MDB2::setOptions($db, $options);
if (PEAR::isError($err)) {
* @param array $arr2
* @return boolean
*/
- function areEquals($arr1, $arr2)
+ static function areEquals($arr1, $arr2)
{
if (count($arr1) != count($arr2)) {
return false;
*
* @access public
*/
- function isResultCommon($value)
+ static function isResultCommon($value)
{
return is_a($value, 'MDB2_Result_Common');
}
*
* @access public
*/
- function errorMessage($value = null)
+ static function errorMessage($value = null)
{
static $errorMessages;
* @access public
* @author Tomas V.V.Cox <cox@idecnet.com>
*/
- function parseDSN($dsn)
+ static function parseDSN($dsn)
{
$parsed = $GLOBALS['_MDB2_dsninfo_default'];
*
* @access public
*/
- function fileExists($file)
+ static function fileExists($file)
{
// safe_mode does notwork with is_readable()
global $SERVERROOT;
}
}
- $err =& PEAR::raiseError(null, $code, $mode, $options, $userinfo, 'MDB2_Error', true);
+ $err = PEAR::raiseError(null, $code, $mode, $options, $userinfo, 'MDB2_Error', true);
if ($err->getMode() !== PEAR_ERROR_RETURN
&& isset($this->nested_transaction_counter) && !$this->has_transaction_error) {
$this->has_transaction_error =& $err;
* @access public
* @since 2.1.1
*/
- function setTransactionIsolation($isolation, $options = array())
+ static function setTransactionIsolation($isolation, $options = array())
{
$this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true));
return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
'result class does not exist '.$class_name, __FUNCTION__);
return $err;
}
- $result =& new $class_name($this, $result, $limit, $offset);
+ $result =new $class_name($this, $result, $limit, $offset);
if (!MDB2::isResultCommon($result)) {
$err =& $this->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
'result class is not extended from MDB2_Result_Common', __FUNCTION__);