Renaming Model::$_findMethods to Model::$findMethods and changing visibility to public. Closes #1328

This commit is contained in:
ADmad 2011-04-17 06:09:00 +05:30
parent a7a076dbee
commit d83712ce43
2 changed files with 7 additions and 7 deletions

View file

@ -373,9 +373,9 @@ class Model extends Object {
* List of valid finder method options, supplied as the first parameter to find(). * List of valid finder method options, supplied as the first parameter to find().
* *
* @var array * @var array
* @access protected * @access public
*/ */
protected $_findMethods = array( public $findMethods = array(
'all' => true, 'first' => true, 'count' => true, 'all' => true, 'first' => true, 'count' => true,
'neighbors' => true, 'list' => true, 'threaded' => true 'neighbors' => true, 'list' => true, 'threaded' => true
); );
@ -453,7 +453,7 @@ class Model extends Object {
} }
if (is_subclass_of($this, 'AppModel')) { if (is_subclass_of($this, 'AppModel')) {
$merge = array('_findMethods'); $merge = array('findMethods');
if ($this->actsAs !== null || $this->actsAs !== false) { if ($this->actsAs !== null || $this->actsAs !== false) {
$merge[] = 'actsAs'; $merge[] = 'actsAs';
} }
@ -2134,7 +2134,7 @@ class Model extends Object {
); );
if ($type !== 'all') { if ($type !== 'all') {
if ($this->_findMethods[$type] === true) { if ($this->findMethods[$type] === true) {
$query = $this->{'_find' . ucfirst($type)}('before', $query); $query = $this->{'_find' . ucfirst($type)}('before', $query);
} }
} }
@ -2183,7 +2183,7 @@ class Model extends Object {
if ($type === 'all') { if ($type === 'all') {
return $results; return $results;
} else { } else {
if ($this->_findMethods[$type] === true) { if ($this->findMethods[$type] === true) {
return $this->{'_find' . ucfirst($type)}('after', $query, $results); return $this->{'_find' . ucfirst($type)}('after', $query, $results);
} }
} }

View file

@ -1299,7 +1299,7 @@ class ModelIntegrationTest extends BaseModelTest {
/** /**
* test Model::__construct * test Model::__construct
* *
* ensure that $actsAS and $_findMethods are merged. * ensure that $actsAS and $findMethods are merged.
* *
* @return void * @return void
*/ */
@ -1320,7 +1320,7 @@ class ModelIntegrationTest extends BaseModelTest {
/** /**
* test Model::__construct * test Model::__construct
* *
* ensure that $actsAS and $_findMethods are merged. * ensure that $actsAS and $findMethods are merged.
* *
* @return void * @return void
*/ */