mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 10:36:16 +00:00
Assigning the helper object in view class, avoiding to use __get magic for each call.
This commit is contained in:
parent
be98491413
commit
d933d6bd73
1 changed files with 2 additions and 1 deletions
|
@ -624,7 +624,8 @@ class View extends Object {
|
||||||
public function loadHelpers() {
|
public function loadHelpers() {
|
||||||
$helpers = HelperCollection::normalizeObjectArray($this->helpers);
|
$helpers = HelperCollection::normalizeObjectArray($this->helpers);
|
||||||
foreach ($helpers as $name => $properties) {
|
foreach ($helpers as $name => $properties) {
|
||||||
$this->Helpers->load($properties['class'], $properties['settings']);
|
list($plugin, $class) = pluginSplit($properties['class']);
|
||||||
|
$this->{$class} = $this->Helpers->load($properties['class'], $properties['settings']);
|
||||||
}
|
}
|
||||||
$this->_helpersLoaded = true;
|
$this->_helpersLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue