Project

General

Profile

Refactoring #2621 » mdb2.patch

Goulwen Reboux, 03/02/2011 11:30

View differences:

common/libraries/plugin/pear/MDB2.php Wed Jan 26 16:46:41 2011 +0100 → common/libraries/plugin/pear/MDB2.php Wed Jan 26 17:09:23 2011 +0100
279 279
     *
280 280
     * @access  public
281 281
     */
282
    function setOptions(&$db, $options)
282
    static function setOptions(&$db, $options)
283 283
    {
284 284
        if (is_array($options)) {
285 285
            foreach ($options as $option => $value) {
......
304 304
     * @static
305 305
     * @access  public
306 306
     */
307
    function classExists($classname)
307
    static public function classExists($classname)
308 308
    {
309 309
        if (version_compare(phpversion(), "5.0", ">=")) {
310 310
            return class_exists($classname, false);
......
325 325
     *
326 326
     * @access  public
327 327
     */
328
    function loadClass($class_name, $debug)
328
    static function loadClass($class_name, $debug)
329 329
    {
330 330
        if (!MDB2::classExists($class_name)) {
331 331
            $file_name = str_replace('_', DIRECTORY_SEPARATOR, $class_name).'.php';
......
374 374
     *
375 375
     * @access  public
376 376
     */
377
    function &factory($dsn, $options = false)
377
    static function &factory($dsn, $options = false)
378 378
    {
379 379
        $dsninfo = MDB2::parseDSN($dsn);
380 380
        if (empty($dsninfo['phptype'])) {
......
431 431
     * @access  public
432 432
     * @see     MDB2::parseDSN
433 433
     */
434
    function &connect($dsn, $options = false)
434
    static function &connect($dsn, $options = false)
435 435
    {
436 436
        $db =& MDB2::factory($dsn, $options);
437 437
        if (PEAR::isError($db)) {
......
625 625
     *
626 626
     * @access  public
627 627
     */
628
    function isError($data, $code = null)
628
    static function isError($data, $code = null)
629 629
    {
630 630
        if (is_a($data, 'MDB2_Error')) {
631 631
            if (is_null($code)) {
......
686 686
     *
687 687
     * @access  public
688 688
     */
689
    function isResultCommon($value)
689
    static function isResultCommon($value)
690 690
    {
691 691
        return is_a($value, 'MDB2_Result_Common');
692 692
    }
......
824 824
     * @access  public
825 825
     * @author  Tomas V.V.Cox <cox@idecnet.com>
826 826
     */
827
    function parseDSN($dsn)
827
    static function parseDSN($dsn)
828 828
    {
829 829
        $parsed = $GLOBALS['_MDB2_dsninfo_default'];
830 830

  
......
2094 2094
     * @access  public
2095 2095
     * @since   2.1.1
2096 2096
     */
2097
    function setTransactionIsolation($isolation, $options = array())
2097
    static function setTransactionIsolation($isolation, $options = array())
2098 2098
    {
2099 2099
        $this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true));
2100 2100
        return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
common/libraries/plugin/pear/MDB2/Driver/ibase.php Wed Jan 26 16:46:41 2011 +0100 → common/libraries/plugin/pear/MDB2/Driver/ibase.php Wed Jan 26 17:09:23 2011 +0100
393 393
     * @access  public
394 394
     * @since   2.1.1
395 395
     */
396
    function setTransactionIsolation($isolation, $options = array())
396
    static function setTransactionIsolation($isolation, $options = array())
397 397
    {
398 398
        $this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true));
399 399
        switch ($isolation) {
common/libraries/plugin/pear/MDB2/Driver/mysql.php Wed Jan 26 16:46:41 2011 +0100 → common/libraries/plugin/pear/MDB2/Driver/mysql.php Wed Jan 26 17:09:23 2011 +0100
462 462
     * @access  public
463 463
     * @since   2.1.1
464 464
     */
465
    function setTransactionIsolation($isolation)
465
    static function setTransactionIsolation($isolation)
466 466
    {
467 467
        $this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true));
468 468
        if (!$this->supports('transactions')) {
common/libraries/plugin/pear/MDB2/Driver/mysqli.php Wed Jan 26 16:46:41 2011 +0100 → common/libraries/plugin/pear/MDB2/Driver/mysqli.php Wed Jan 26 17:09:23 2011 +0100
459 459
     * @access  public
460 460
     * @since   2.1.1
461 461
     */
462
    function setTransactionIsolation($isolation)
462
    static function setTransactionIsolation($isolation, $options = array())
463 463
    {
464 464
        $this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true));
465 465
        if (!$this->supports('transactions')) {
common/libraries/plugin/pear/MDB2/Driver/oci8.php Wed Jan 26 16:46:41 2011 +0100 → common/libraries/plugin/pear/MDB2/Driver/oci8.php Wed Jan 26 17:09:23 2011 +0100
291 291
     * @access  public
292 292
     * @since   2.1.1
293 293
     */
294
    function setTransactionIsolation($isolation)
294
    static function setTransactionIsolation($isolation)
295 295
    {
296 296
        $this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true));
297 297
        switch ($isolation) {
common/libraries/plugin/pear/MDB2/Driver/pgsql.php Wed Jan 26 16:46:41 2011 +0100 → common/libraries/plugin/pear/MDB2/Driver/pgsql.php Wed Jan 26 17:09:23 2011 +0100
343 343
     * @access  public
344 344
     * @since   2.1.1
345 345
     */
346
    function setTransactionIsolation($isolation)
346
    static function setTransactionIsolation($isolation)
347 347
    {
348 348
        $this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true));
349 349
        switch ($isolation) {
common/libraries/plugin/pear/MDB2/Driver/sqlite.php Wed Jan 26 16:46:41 2011 +0100 → common/libraries/plugin/pear/MDB2/Driver/sqlite.php Wed Jan 26 17:09:23 2011 +0100
299 299
     * @access  public
300 300
     * @since   2.1.1
301 301
     */
302
    function setTransactionIsolation($isolation)
302
    static function setTransactionIsolation($isolation)
303 303
    {
304 304
        $this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true));
305 305
        switch ($isolation) {
common/libraries/plugin/pear/PEAR.php Wed Jan 26 16:46:41 2011 +0100 → common/libraries/plugin/pear/PEAR.php Wed Jan 26 17:09:23 2011 +0100
276 276
     * @access  public
277 277
     * @return  bool    true if parameter is an error
278 278
     */
279
    function isError($data, $code = null)
279
    static function isError($data, $code = null)
280 280
    {
281 281
        if (is_a($data, 'PEAR_Error')) {
282 282
            if (is_null($code)) {
    (1-1/1)