Assigning the helper object in view class, avoiding to use __get magic for each call.

This commit is contained in:
Juan Basso 2011-01-23 20:51:56 -02:00
parent be98491413
commit d933d6bd73

View file

@ -624,7 +624,8 @@ class View extends Object {
public function loadHelpers() {
$helpers = HelperCollection::normalizeObjectArray($this->helpers);
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;
}