mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Renaming Model::$_findMethods to Model::$findMethods and changing visibility to public. Closes #1328
This commit is contained in:
parent
a7a076dbee
commit
d83712ce43
2 changed files with 7 additions and 7 deletions
|
@ -373,9 +373,9 @@ class Model extends Object {
|
|||
* List of valid finder method options, supplied as the first parameter to find().
|
||||
*
|
||||
* @var array
|
||||
* @access protected
|
||||
* @access public
|
||||
*/
|
||||
protected $_findMethods = array(
|
||||
public $findMethods = array(
|
||||
'all' => true, 'first' => true, 'count' => true,
|
||||
'neighbors' => true, 'list' => true, 'threaded' => true
|
||||
);
|
||||
|
@ -453,7 +453,7 @@ class Model extends Object {
|
|||
}
|
||||
|
||||
if (is_subclass_of($this, 'AppModel')) {
|
||||
$merge = array('_findMethods');
|
||||
$merge = array('findMethods');
|
||||
if ($this->actsAs !== null || $this->actsAs !== false) {
|
||||
$merge[] = 'actsAs';
|
||||
}
|
||||
|
@ -2134,7 +2134,7 @@ class Model extends Object {
|
|||
);
|
||||
|
||||
if ($type !== 'all') {
|
||||
if ($this->_findMethods[$type] === true) {
|
||||
if ($this->findMethods[$type] === true) {
|
||||
$query = $this->{'_find' . ucfirst($type)}('before', $query);
|
||||
}
|
||||
}
|
||||
|
@ -2183,7 +2183,7 @@ class Model extends Object {
|
|||
if ($type === 'all') {
|
||||
return $results;
|
||||
} else {
|
||||
if ($this->_findMethods[$type] === true) {
|
||||
if ($this->findMethods[$type] === true) {
|
||||
return $this->{'_find' . ucfirst($type)}('after', $query, $results);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1299,7 +1299,7 @@ class ModelIntegrationTest extends BaseModelTest {
|
|||
/**
|
||||
* test Model::__construct
|
||||
*
|
||||
* ensure that $actsAS and $_findMethods are merged.
|
||||
* ensure that $actsAS and $findMethods are merged.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
@ -1320,7 +1320,7 @@ class ModelIntegrationTest extends BaseModelTest {
|
|||
/**
|
||||
* test Model::__construct
|
||||
*
|
||||
* ensure that $actsAS and $_findMethods are merged.
|
||||
* ensure that $actsAS and $findMethods are merged.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue