Skip to content

Commit

Permalink
Renaming Helper::__name to Helper::_name for proper access level for …
Browse files Browse the repository at this point in the history
…extension overloading and callback.
  • Loading branch information
predominant committed Nov 15, 2009
1 parent 0b2fc5b commit 0049c9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions cake/libs/view/helper.php
Expand Up @@ -578,8 +578,9 @@ function domId($options = null, $id = 'id') {
* @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();
Expand Down Expand Up @@ -689,7 +690,7 @@ function _initInputField($field, $options = array()) {
$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()) {
Expand Down
7 changes: 4 additions & 3 deletions cake/libs/view/helpers/form.php
Expand Up @@ -1751,8 +1751,9 @@ function dateTime($fieldName, $dateFormat = 'DMY', $timeFormat = '12', $selected
* @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();
Expand All @@ -1777,7 +1778,7 @@ function __name($options = array(), $field = null, $key = 'name') {
return $name;
}
}
return parent::__name($options, $field, $key);
return parent::_name($options, $field, $key);
}

/**
Expand Down Expand Up @@ -1846,7 +1847,7 @@ function __selectOptions($elements = array(), $selected = null, $parents = array
$label['class'] = 'selected';
}

list($name) = array_values($this->__name());
list($name) = array_values($this->_name());

if (empty($attributes['class'])) {
$attributes['class'] = 'checkbox';
Expand Down

0 comments on commit 0049c9a

Please sign in to comment.