Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, October 14, 2026

Diff for Metafox/lib/DB.php between version 1.3 and 1.4

version 1.3, 2011/06/17 13:56:38 version 1.4, 2014/10/15 13:00:16
Line 444  class DB
Line 444  class DB
      *       *
      * @see DB_common::setOption()       * @see DB_common::setOption()
      */       */
     function &factory($type, $options = false)      static function &factory($type, $options = false)
     {      {
         if (!is_array($options)) {          if (!is_array($options)) {
             $options = array('persistent' => $options);              $options = array('persistent' => $options);
Line 515  class DB
Line 515  class DB
      *       *
      * @uses DB::parseDSN(), DB_common::setOption(), PEAR::isError()       * @uses DB::parseDSN(), DB_common::setOption(), PEAR::isError()
      */       */
     function &connect($dsn, $options = array())      static function &connect($dsn, $options = array())
     {      {
         $dsninfo = DB::parseDSN($dsn);          $dsninfo = DB::parseDSN($dsn);
         $type = $dsninfo['phptype'];          $type = $dsninfo['phptype'];
Line 574  class DB
Line 574  class DB
      *       *
      * @return string  the DB API version number       * @return string  the DB API version number
      */       */
     function apiVersion()      static function apiVersion()
     {      {
         return '1.7.14RC2';          return '1.7.14RC2';
     }      }
Line 589  class DB
Line 589  class DB
      *       *
      * @return bool  whether $value is DB_Error object       * @return bool  whether $value is DB_Error object
      */       */
     function isError($value)      static function isError($value)
     {      {
         return is_a($value, 'DB_Error');          return is_a($value, 'DB_Error');
     }      }
Line 604  class DB
Line 604  class DB
      *       *
      * @return bool  whether $value is a DB_<driver> object       * @return bool  whether $value is a DB_<driver> object
      */       */
     function isConnection($value)      static function isConnection($value)
     {      {
         return (is_object($value) &&          return (is_object($value) &&
                 is_subclass_of($value, 'db_common') &&                  is_subclass_of($value, 'db_common') &&
Line 625  class DB
Line 625  class DB
      *       *
      * @return boolean  whether $query is a data manipulation query       * @return boolean  whether $query is a data manipulation query
      */       */
     function isManip($query)      static function isManip($query)
     {      {
         $manips = 'INSERT|UPDATE|DELETE|REPLACE|'          $manips = 'INSERT|UPDATE|DELETE|REPLACE|'
                 . 'CREATE|DROP|'                  . 'CREATE|DROP|'
Line 649  class DB
Line 649  class DB
      * @return string  the error message or false if the error code was       * @return string  the error message or false if the error code was
      *                  not recognized       *                  not recognized
      */       */
     function errorMessage($value)      static function errorMessage($value)
     {      {
         static $errorMessages;          static $errorMessages;
         if (!isset($errorMessages)) {          if (!isset($errorMessages)) {
Line 730  class DB
Line 730  class DB
      *  + username: User name for login       *  + username: User name for login
      *  + password: Password for login       *  + password: Password for login
      */       */
     function parseDSN($dsn)      static function parseDSN($dsn)
     {      {
         $parsed = array(          $parsed = array(
             'phptype'  => false,              'phptype'  => false,
Line 859  class DB
Line 859  class DB
      * @param boolean true to hide the password, false to include it       * @param boolean true to hide the password, false to include it
      * @return string       * @return string
      */       */
     function getDSNString($dsn, $hidePassword) {      static function getDSNString($dsn, $hidePassword) {
         /* Calling parseDSN will ensure that we have all the array elements          /* Calling parseDSN will ensure that we have all the array elements
          * defined, and means that we deal with strings and array in the same           * defined, and means that we deal with strings and array in the same
          * manner. */           * manner. */

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top