mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 07:29:51 +00:00
Changing code in View::_loadHelpers() to use Inflector::variable()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3767 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
1634eefce5
commit
54583f0afe
1 changed files with 2 additions and 3 deletions
|
@ -384,7 +384,7 @@ class View extends Object {
|
||||||
* and the $params array is used to send data to be used in the
|
* and the $params array is used to send data to be used in the
|
||||||
* Element.
|
* Element.
|
||||||
*
|
*
|
||||||
* @link
|
* @link
|
||||||
* @param string $name Name of template file in the/app/views/elements/ folder
|
* @param string $name Name of template file in the/app/views/elements/ folder
|
||||||
* @param array $params Array of data to be made available to the for rendered view (i.e. the Element)
|
* @param array $params Array of data to be made available to the for rendered view (i.e. the Element)
|
||||||
* @return string Rendered output
|
* @return string Rendered output
|
||||||
|
@ -779,8 +779,7 @@ class View extends Object {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$replace = strtolower(substr($helper, 0, 1));
|
$camelBackedHelper = Inflector::variable($helper);
|
||||||
$camelBackedHelper = preg_replace('/\\w/', $replace, $helper, 1);
|
|
||||||
|
|
||||||
${$camelBackedHelper} =& new $helperCn;
|
${$camelBackedHelper} =& new $helperCn;
|
||||||
${$camelBackedHelper}->view =& $this;
|
${$camelBackedHelper}->view =& $this;
|
||||||
|
|
Loading…
Add table
Reference in a new issue