mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix protected call for _build on CakeSchema, and associated references.
This commit is contained in:
parent
59fb134455
commit
ea635d6bea
2 changed files with 6 additions and 8 deletions
|
@ -102,7 +102,7 @@ class CakeSchema extends Object {
|
|||
}
|
||||
|
||||
$options = array_merge(get_object_vars($this), $options);
|
||||
$this->_build($options);
|
||||
$this->build($options);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -111,7 +111,7 @@ class CakeSchema extends Object {
|
|||
* @param array $data loaded object properties
|
||||
* @return void
|
||||
*/
|
||||
protected function _build($data) {
|
||||
public function build($data) {
|
||||
$file = null;
|
||||
foreach ($data as $key => $val) {
|
||||
if (!empty($val)) {
|
||||
|
@ -162,7 +162,7 @@ class CakeSchema extends Object {
|
|||
$options = array('path' => $options);
|
||||
}
|
||||
|
||||
$this->_build($options);
|
||||
$this->build($options);
|
||||
extract(get_object_vars($this));
|
||||
|
||||
$class = $name .'Schema';
|
||||
|
@ -318,7 +318,7 @@ class CakeSchema extends Object {
|
|||
public function write($object, $options = array()) {
|
||||
if (is_object($object)) {
|
||||
$object = get_object_vars($object);
|
||||
$this->_build($object);
|
||||
$this->build($object);
|
||||
}
|
||||
|
||||
if (is_array($object)) {
|
||||
|
|
|
@ -36,14 +36,12 @@ class CakeTestFixture extends Object {
|
|||
/**
|
||||
* Cake's DBO driver (e.g: DboMysql).
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public $db = null;
|
||||
|
||||
/**
|
||||
* Full Table Name
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public $table = null;
|
||||
|
||||
|
@ -131,7 +129,7 @@ class CakeTestFixture extends Object {
|
|||
return false;
|
||||
}
|
||||
|
||||
$this->Schema->_build(array($this->table => $this->fields));
|
||||
$this->Schema->build(array($this->table => $this->fields));
|
||||
return (
|
||||
$db->execute($db->createSchema($this->Schema), array('log' => false)) !== false
|
||||
);
|
||||
|
@ -144,7 +142,7 @@ class CakeTestFixture extends Object {
|
|||
* @return boolean True on success, false on failure
|
||||
*/
|
||||
public function drop(&$db) {
|
||||
$this->Schema->_build(array($this->table => $this->fields));
|
||||
$this->Schema->build(array($this->table => $this->fields));
|
||||
return (
|
||||
$db->execute($db->dropSchema($this->Schema), array('log' => false)) !== false
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue