Permalink
Browse files

Renaming Helper::__name to Helper::_name for proper access level for …

…extension overloading and callback.
  • Loading branch information...
1 parent 0b2fc5b commit 0049c9ad81bf4f1fced47ce6fe603f6264452b19 @predominant predominant committed Nov 15, 2009
Showing with 7 additions and 5 deletions.
  1. +3 −2 cake/libs/view/helper.php
  2. +4 −3 cake/libs/view/helpers/form.php
@@ -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();
@@ -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()) {
@@ -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();
@@ -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);
}
/**
@@ -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';

0 comments on commit 0049c9a

Please sign in to comment.