mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #12506 from bancer/dbosource-missing-methods
Add missing method definitions
This commit is contained in:
commit
bfdab3d11d
4 changed files with 23 additions and 4 deletions
|
@ -765,10 +765,10 @@ class Postgres extends DboSource {
|
||||||
/**
|
/**
|
||||||
* resultSet method
|
* resultSet method
|
||||||
*
|
*
|
||||||
* @param array &$results The results
|
* @param PDOStatement $results The results
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function resultSet(&$results) {
|
public function resultSet($results) {
|
||||||
$this->map = array();
|
$this->map = array();
|
||||||
$numFields = $results->columnCount();
|
$numFields = $results->columnCount();
|
||||||
$index = 0;
|
$index = 0;
|
||||||
|
|
|
@ -299,7 +299,7 @@ class Sqlite extends DboSource {
|
||||||
/**
|
/**
|
||||||
* Generate ResultSet
|
* Generate ResultSet
|
||||||
*
|
*
|
||||||
* @param mixed $results The results to modify.
|
* @param PDOStatement $results The results to modify.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function resultSet($results) {
|
public function resultSet($results) {
|
||||||
|
|
|
@ -272,6 +272,16 @@ class DboSource extends DataSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connects to the database.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function connect() {
|
||||||
|
// This method is implemented in subclasses
|
||||||
|
return $this->connected;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reconnects to database server with optional new settings
|
* Reconnects to database server with optional new settings
|
||||||
*
|
*
|
||||||
|
@ -619,6 +629,16 @@ class DboSource extends DataSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds a map of the columns contained in a result
|
||||||
|
*
|
||||||
|
* @param PDOStatement $results The results to format.
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function resultSet($results) {
|
||||||
|
// This method is implemented in subclasses
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a row from current resultset as an array
|
* Returns a row from current resultset as an array
|
||||||
*
|
*
|
||||||
|
|
|
@ -231,7 +231,6 @@ class CakeTestFixtureTest extends CakeTestCase {
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$methods = array_diff(get_class_methods('DboSource'), array('enabled'));
|
$methods = array_diff(get_class_methods('DboSource'), array('enabled'));
|
||||||
$methods[] = 'connect';
|
|
||||||
|
|
||||||
$this->criticDb = $this->getMock('DboSource', $methods);
|
$this->criticDb = $this->getMock('DboSource', $methods);
|
||||||
$this->criticDb->fullDebug = true;
|
$this->criticDb->fullDebug = true;
|
||||||
|
|
Loading…
Reference in a new issue