Renaming Helper::__name to Helper::_name for proper access level for extension overloading and callback.

This commit is contained in:
predominant 2009-11-15 21:18:46 +11:00
parent 0b2fc5b35f
commit 0049c9ad81
2 changed files with 7 additions and 5 deletions

View file

@ -578,8 +578,9 @@ class Helper extends Overloadable {
* @param array $options
* @param string $key
* @return array
* @access protected
*/
function __name($options = array(), $field = null, $key = 'name') {
function _name($options = array(), $field = null, $key = 'name') {
$view =& ClassRegistry::getObject('view');
if ($options === null) {
$options = array();
@ -689,7 +690,7 @@ class Helper extends Overloadable {
$this->setEntity($field);
}
$options = (array)$options;
$options = $this->__name($options);
$options = $this->_name($options);
$options = $this->value($options);
$options = $this->domId($options);
if ($this->tagIsInvalid()) {

View file

@ -1751,8 +1751,9 @@ class FormHelper extends AppHelper {
* @param array $options
* @param string $key
* @return array
* @access protected
*/
function __name($options = array(), $field = null, $key = 'name') {
function _name($options = array(), $field = null, $key = 'name') {
if ($this->requestType == 'get') {
if ($options === null) {
$options = array();
@ -1777,7 +1778,7 @@ class FormHelper extends AppHelper {
return $name;
}
}
return parent::__name($options, $field, $key);
return parent::_name($options, $field, $key);
}
/**
@ -1846,7 +1847,7 @@ class FormHelper extends AppHelper {
$label['class'] = 'selected';
}
list($name) = array_values($this->__name());
list($name) = array_values($this->_name());
if (empty($attributes['class'])) {
$attributes['class'] = 'checkbox';