From aaff0591322204534d905814a0c207c8cee845d8 Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 4 Nov 2010 23:55:50 -0400 Subject: [PATCH] Moving output into a property, and removing extra arguments from helpers. Having a view property reduces the number of strings that are copied around. --- cake/libs/view/helper.php | 6 ++---- cake/libs/view/view.php | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cake/libs/view/helper.php b/cake/libs/view/helper.php index e435ed067..2b0be4091 100644 --- a/cake/libs/view/helper.php +++ b/cake/libs/view/helper.php @@ -814,10 +814,9 @@ class Helper extends Object { * Overridden in subclasses. * * @param string $viewFile The view file that was rendered. - * @param string $content The content of the rendered view. * @return void */ - public function afterRender($viewFile, $content) { + public function afterRender($viewFile) { } /** @@ -837,10 +836,9 @@ class Helper extends Object { * Overridden in subclasses. * * @param string $layoutFile The layout file that was rendered. - * @param string $content The content of the rendered layout. * @return void */ - public function afterLayout($layoutFile, $content) { + public function afterLayout($layoutFile) { } /** diff --git a/cake/libs/view/view.php b/cake/libs/view/view.php index 1a71fd9fd..425d35d7b 100644 --- a/cake/libs/view/view.php +++ b/cake/libs/view/view.php @@ -401,7 +401,7 @@ class View extends Object { if ($action !== false && $viewFileName = $this->_getViewFileName($action)) { $this->Helpers->trigger('beforeRender', array($viewFileName)); $this->output = $this->_render($viewFileName); - $this->Helpers->trigger('afterRender', array($viewFileName, $this->output)); + $this->Helpers->trigger('afterRender', array($viewFileName)); } if ($layout === null) { @@ -462,7 +462,7 @@ class View extends Object { throw new RuntimeException(sprintf(__("Error in layout %s, got no content."), $layoutFileName)); } - $this->Helpers->trigger('afterLayout', array($layoutFileName, $this->output)); + $this->Helpers->trigger('afterLayout', array($layoutFileName)); return $this->output; }