Просмотр исходного кода

[ZF-7525]Line endings in Zend/Db/Adapter/Sqlsrv

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@17456 44c647ce-9c0f-0410-b52a-842ac1e357ba
yoshida@zend.co.jp 16 лет назад
Родитель
Сommit
706b2f097d

+ 8 - 10
library/Zend/Db/Adapter/Sqlsrv.php

@@ -20,11 +20,6 @@
  */
 
 /**
- * @see Zend_Loader
- */
-require_once 'Zend/Loader.php';
-
-/**
  * @see Zend_Db_Adapter_Abstract
  */
 require_once 'Zend/Db/Adapter/Abstract.php';
@@ -133,7 +128,7 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
         if (isset($this->_config['port'])) {
             $port        = (integer) $this->_config['port'];
             $serverName .= ', ' . $port;
-        } 
+        }
 
         $connectionInfo = array(
             'Database' => $this->_config['dbname'],
@@ -252,6 +247,9 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
         $stmtClass = $this->_defaultStmtClass;
 
         if (!class_exists($stmtClass)) {
+            /**
+             * @see Zend_Loader
+             */
             require_once 'Zend/Loader.php';
             Zend_Loader::loadClass($stmtClass);
         }
@@ -299,7 +297,7 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
             $sql       = 'SELECT IDENT_CURRENT (' . $tableName . ') as Current_Identity';
             return (string) $this->fetchOne($sql);
         }
-        
+
         if ($this->_lastInsertId > 0) {
             return (string) $this->_lastInsertId;
         }
@@ -347,7 +345,7 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
 
         return $result;
     }
-    
+
     /**
      * Returns a list of the tables in the database.
      *
@@ -414,14 +412,14 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
          * Discover primary key column(s) for this table.
          */
         $tableOwner = $result[0][$owner];
-        $sql        = "exec sp_pkeys @table_owner = " . $tableOwner 
+        $sql        = "exec sp_pkeys @table_owner = " . $tableOwner
                     . ", @table_name = " . $this->quoteIdentifier($tableName, true);
         $stmt       = $this->query($sql);
 
         $primaryKeysResult = $stmt->fetchAll(Zend_Db::FETCH_NUM);
         $primaryKeyColumn  = array();
 
-        // Per http://msdn.microsoft.com/en-us/library/ms189813.aspx, 
+        // Per http://msdn.microsoft.com/en-us/library/ms189813.aspx,
         // results from sp_keys stored procedure are:
         // 0=TABLE_QUALIFIER 1=TABLE_OWNER 2=TABLE_NAME 3=COLUMN_NAME 4=KEY_SEQ 5=PK_NAME
 

+ 4 - 4
library/Zend/Db/Adapter/Sqlsrv/Exception.php

@@ -21,7 +21,7 @@
  */
 
 /**
- * Zend
+ * @see Zend_Db_Adapter_Exception
  */
 require_once 'Zend/Db/Adapter/Exception.php';
 
@@ -39,14 +39,14 @@ class Zend_Db_Adapter_Sqlsrv_Exception extends Zend_Db_Adapter_Exception
     /**
      * Constructor
      *
-     * If $message is an array, the assumption is that the return value of 
+     * If $message is an array, the assumption is that the return value of
      * sqlsrv_errors() was provided. If so, it then retrieves the most recent
      * error from that stack, and sets the message and code based on it.
      *
      * @param null|array|string $message
      * @param null|int $code
      */
-    public function __construct($message = null, $code = 0) 
+    public function __construct($message = null, $code = 0)
     {
        if (is_array($message)) {
             // Error should be array of errors
@@ -57,7 +57,7 @@ class Zend_Db_Adapter_Sqlsrv_Exception extends Zend_Db_Adapter_Exception
 
             $code    = (int)    $message['code'];
             $message = (string) $message['message'];
-       } 
+       }
        parent::__construct($message, new Exception($message, $code));
    }
 }

+ 4 - 4
library/Zend/Db/Statement/Sqlsrv/Exception.php

@@ -19,7 +19,7 @@
  */
 
 /**
- * Zend_Db_Statement_Exception
+ * @see Zend_Db_Statement_Exception
  */
 require_once 'Zend/Db/Statement/Exception.php';
 
@@ -34,14 +34,14 @@ class Zend_Db_Statement_Sqlsrv_Exception extends Zend_Db_Statement_Exception
     /**
      * Constructor
      *
-     * If $message is an array, the assumption is that the return value of 
+     * If $message is an array, the assumption is that the return value of
      * sqlsrv_errors() was provided. If so, it then retrieves the most recent
      * error from that stack, and sets the message and code based on it.
      *
      * @param null|array|string $message
      * @param null|int $code
      */
-    public function __construct($message = null, $code = 0) 
+    public function __construct($message = null, $code = 0)
     {
        if (is_array($message)) {
             // Error should be array of errors
@@ -52,7 +52,7 @@ class Zend_Db_Statement_Sqlsrv_Exception extends Zend_Db_Statement_Exception
 
             $code    = (int)    $message['code'];
             $message = (string) $message['message'];
-       } 
+       }
        parent::__construct($message, $code);
    }
 }