Skip to content
Permalink
Browse files

Update headers & doc blocks.

  • Loading branch information...
markstory committed Mar 5, 2013
1 parent 3462539 commit 812a0609ca0650590b69a808c403a6ea24921e22
Showing with 395 additions and 220 deletions.
  1. +16 −1 lib/Cake/Model/Datasource/Database/Connection.php
  2. +8 −8 lib/Cake/Model/Datasource/Database/Dialect/PostgresDialect.php
  3. +16 −1 lib/Cake/Model/Datasource/Database/Driver.php
  4. +18 −3 lib/Cake/Model/Datasource/Database/Driver/Mysql.php
  5. +26 −11 lib/Cake/Model/Datasource/Database/Driver/PDODriver.php
  6. +13 −13 lib/Cake/Model/Datasource/Database/Driver/Postgres.php
  7. +19 −4 lib/Cake/Model/Datasource/Database/Driver/Sqlite.php
  8. +9 −11 lib/Cake/Model/Datasource/Database/Exception/MissingConnectionException.php
  9. +9 −10 lib/Cake/Model/Datasource/Database/Exception/MissingDriverException.php
  10. +9 −10 lib/Cake/Model/Datasource/Database/Exception/MissingExtensionException.php
  11. +8 −8 lib/Cake/Model/Datasource/Database/Expression.php
  12. +1 −2 lib/Cake/Model/Datasource/Database/Expression/Comparison.php
  13. +16 −1 lib/Cake/Model/Datasource/Database/Expression/OrderByExpression.php
  14. +9 −9 lib/Cake/Model/Datasource/Database/Expression/QueryExpression.php
  15. +16 −1 lib/Cake/Model/Datasource/Database/Expression/UnaryExpression.php
  16. +1 −1 lib/Cake/Model/Datasource/Database/Expression/ValuesExpression.php
  17. +8 −8 lib/Cake/Model/Datasource/Database/Query.php
  18. +8 −8 lib/Cake/Model/Datasource/Database/SqlDialect.php
  19. +34 −19 lib/Cake/Model/Datasource/Database/Statement.php
  20. +8 −8 lib/Cake/Model/Datasource/Database/Statement/BufferedStatement.php
  21. +8 −8 lib/Cake/Model/Datasource/Database/Statement/CallbackStatement.php
  22. +30 −15 lib/Cake/Model/Datasource/Database/Type.php
  23. +19 −4 lib/Cake/Model/Datasource/Database/Type/BooleanType.php
  24. +16 −1 lib/Cake/Model/Datasource/Database/Type/DateTimeType.php
  25. +16 −1 lib/Cake/Model/Datasource/Database/Type/DateType.php
  26. +10 −10 lib/Cake/Model/Datasource/Database/TypeConverter.php
  27. +8 −8 lib/Cake/Test/TestCase/Model/Datasource/Database/ConnectionTest.php
  28. +8 −8 lib/Cake/Test/TestCase/Model/Datasource/Database/QueryTest.php
  29. +28 −28 lib/Cake/Test/TestCase/Model/Datasource/Database/TypeTest.php
@@ -1,5 +1,20 @@
<?php
/**
* PHP Version 5.4
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Model
* @since CakePHP(tm) v 3.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace Cake\Model\Datasource\Database;
use Cake\Model\Datasource\Database\Exception\MissingConnectionException;
@@ -1,18 +1,18 @@
<?php
/**
*
* PHP Version 5.4
*
* CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The Open Group Test Suite License
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2013, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
* @package Cake.Test.Case.Model.Datasource.Database
* @since CakePHP(tm) v 3.0
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Model
* @since CakePHP(tm) v 3.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace Cake\Model\Datasource\Database\Dialect;
@@ -1,5 +1,20 @@
<?php
/**
* PHP Version 5.4
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Model
* @since CakePHP(tm) v 3.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace Cake\Model\Datasource\Database;
use \Cake\Model\Datasource\Database\SqlDialect;
@@ -1,5 +1,20 @@
<?php
/**
* PHP Version 5.4
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Model
* @since CakePHP(tm) v 3.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace Cake\Model\Datasource\Database\Driver;
use PDO;
@@ -30,7 +45,7 @@ class Mysql extends \Cake\Model\Datasource\Database\Driver {
*
* @param array $config configuration to be used for creating connection
* @return boolean true on success
**/
*/
public function connect(array $config) {
$config += $this->_baseConfig;
$config['flags'] += [
@@ -54,7 +69,7 @@ public function connect(array $config) {
* Returns whether php is able to use this driver for connecting to database
*
* @return boolean true if it is valid to use this driver
**/
*/
public function enabled() {
return in_array('mysql', PDO::getAvailableDrivers());
@@ -1,5 +1,20 @@
<?php
/**
* PHP Version 5.4
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Model
* @since CakePHP(tm) v 3.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace Cake\Model\Datasource\Database\Driver;
use Cake\Model\Datasource\Database\Statement;
@@ -12,7 +27,7 @@ trait PDODriver {
*
* @param array $config configuration to be used for creating connection
* @return boolean true on success
**/
*/
public function connect(array $config) {
$connection = new PDO(
$config['dsn'],
@@ -30,7 +45,7 @@ public function connect(array $config) {
* result to the value passed
*
* @return mixed connection object used internally
**/
*/
public function connection($connection = null) {
if ($connection !== null) {
$this->_connection = $connection;
@@ -42,7 +57,7 @@ public function connection($connection = null) {
* Disconnects from database server
*
* @return void
**/
*/
public function disconnect() {
$this->_connection = null;
}
@@ -52,7 +67,7 @@ public function disconnect() {
*
* @param string $sql
* @return Cake\Model\Datasource\Database\Statement
**/
*/
public function prepare($sql) {
$statement = $this->connection()->prepare($sql);
return new Statement($statement, $this);
@@ -62,7 +77,7 @@ public function prepare($sql) {
* Starts a transaction
*
* @return boolean true on success, false otherwise
**/
*/
public function beginTransaction() {
return $this->connection()->beginTransaction();
}
@@ -71,7 +86,7 @@ public function beginTransaction() {
* Commits a transaction
*
* @return boolean true on success, false otherwise
**/
*/
public function commitTransaction() {
return $this->connection()->commit();
}
@@ -80,7 +95,7 @@ public function commitTransaction() {
* Rollsback a transaction
*
* @return boolean true on success, false otherwise
**/
*/
public function rollbackTransaction() {
return $this->connection()->rollback();
}
@@ -89,7 +104,7 @@ public function rollbackTransaction() {
* Returns a value in a safe representation to be used in a query string
*
* @return string
**/
*/
public function quote($value, $type) {
return $this->connection()->quote($value, $type);
}
@@ -99,7 +114,7 @@ public function quote($value, $type) {
*
* @param string $table table name or sequence to get last insert value from
* @return string|integer
**/
*/
public function lastInsertId($table = null) {
return $this->connection()->lastInsertId();
}
@@ -108,7 +123,7 @@ public function lastInsertId($table = null) {
* Checks if the driver supports quoting, as PDO_ODBC does not support it.
*
* @return boolean
**/
*/
public function supportsQuoting() {
return $this->connection()->getAttribute(PDO::ATTR_DRIVER_NAME) !== 'odbc';
}
@@ -1,18 +1,18 @@
<?php
/**
*
* PHP Version 5.4
*
* CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The Open Group Test Suite License
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2013, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
* @package Cake.Test.Case.Model.Datasource.Database
* @since CakePHP(tm) v 3.0
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Model
* @since CakePHP(tm) v 3.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace Cake\Model\Datasource\Database\Driver;
@@ -49,7 +49,7 @@ class Postgres extends \Cake\Model\Datasource\Database\Driver {
*
* @param array $config configuration to be used for creating connection
* @return boolean true on success
**/
*/
public function connect(array $config) {
$config += $this->_baseConfig;
$config['flags'] += [
@@ -75,7 +75,7 @@ public function connect(array $config) {
* Returns whether php is able to use this driver for connecting to database
*
* @return boolean true if it is valid to use this driver
**/
*/
public function enabled() {
return in_array('pgsql', PDO::getAvailableDrivers());
@@ -86,7 +86,7 @@ public function enabled() {
*
* @param string $sql
* @return Cake\Model\Datasource\Database\Statement
**/
*/
public function prepare($sql) {
$statement = $this->connection()->prepare($sql);
return new Statement($statement, $this);
@@ -96,7 +96,7 @@ public function prepare($sql) {
* Sets connection encoding
*
* @return void
**/
*/
public function setEncoding($encoding) {
$this->_connection->exec('SET NAMES ' . $this->_connection->quote($encoding));
}
@@ -106,7 +106,7 @@ public function setEncoding($encoding) {
* postgres will fallback to looking the relation into defined default schema
*
* @return void
**/
*/
public function setSchema($schema) {
$this->_connection->exec('SET search_path TO ' . $this->_connection->quote($schema));
}
@@ -1,5 +1,20 @@
<?php
/**
* PHP Version 5.4
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Model
* @since CakePHP(tm) v 3.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace Cake\Model\Datasource\Database\Driver;
use Cake\Model\Datasource\Database\Statement\BufferedStatement;
@@ -27,7 +42,7 @@ class Sqlite extends \Cake\Model\Datasource\Database\Driver {
*
* @param array $config configuration to be used for creating connection
* @return boolean true on success
**/
*/
public function connect(array $config) {
$config += $this->_baseConfig + ['login' => null, 'password' => null];
$config['flags'] += [
@@ -46,7 +61,7 @@ public function connect(array $config) {
* Returns whether php is able to use this driver for connecting to database
*
* @return boolean true if it is valid to use this driver
**/
*/
public function enabled() {
return in_array('sqlite', PDO::getAvailableDrivers());
@@ -57,7 +72,7 @@ public function enabled() {
*
* @param string $sql
* @return Cake\Model\Datasource\Database\Statement
**/
*/
public function prepare($sql) {
$statement = $this->connection()->prepare($sql);
return new BufferedStatement($statement, $this);
@@ -1,26 +1,24 @@
<?php
/**
*
* PHP Version 5.x
* PHP Version 5.4
*
* CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The Open Group Test Suite License
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
* @package Cake.Model.Datasource.Database.Exception
* @since CakePHP(tm) v 3.0
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Model
* @since CakePHP(tm) v 3.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace Cake\Model\Datasource\Database\Exception;
class MissingConnectionException extends \Cake\Error\Exception {
protected $_messageTemplate = 'Connection to database could not be established: %s';
}
Oops, something went wrong.

0 comments on commit 812a060

Please sign in to comment.
You can’t perform that action at this time.