mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-05 04:04:10 +02:00
- reformating for PSR-2 coding standards https://github.com/smarty-php/smarty/pull/483
This commit is contained in:
@@ -55,19 +55,21 @@ class Smarty_Internal_Runtime_Capture
|
||||
* Open capture section
|
||||
*
|
||||
* @param \Smarty_Internal_Template $_template
|
||||
* @param string $buffer capture name
|
||||
* @param string $assign variable name
|
||||
* @param string $append variable name
|
||||
* @param string $buffer capture name
|
||||
* @param string $assign variable name
|
||||
* @param string $append variable name
|
||||
*/
|
||||
public function open(Smarty_Internal_Template $_template, $buffer, $assign, $append)
|
||||
{
|
||||
if (!$this->isRegistered) {
|
||||
$this->register($_template);
|
||||
}
|
||||
$this->captureStack[] = array($buffer,
|
||||
$assign,
|
||||
$append);
|
||||
$this->captureCount ++;
|
||||
$this->captureStack[] = array(
|
||||
$buffer,
|
||||
$assign,
|
||||
$append
|
||||
);
|
||||
$this->captureCount++;
|
||||
ob_start();
|
||||
}
|
||||
|
||||
@@ -78,10 +80,14 @@ class Smarty_Internal_Runtime_Capture
|
||||
*/
|
||||
private function register(Smarty_Internal_Template $_template)
|
||||
{
|
||||
$_template->startRenderCallbacks[] = array($this,
|
||||
'startRender');
|
||||
$_template->endRenderCallbacks[] = array($this,
|
||||
'endRender');
|
||||
$_template->startRenderCallbacks[] = array(
|
||||
$this,
|
||||
'startRender'
|
||||
);
|
||||
$_template->endRenderCallbacks[] = array(
|
||||
$this,
|
||||
'endRender'
|
||||
);
|
||||
$this->startRender($_template);
|
||||
$this->isRegistered = true;
|
||||
}
|
||||
@@ -108,7 +114,7 @@ class Smarty_Internal_Runtime_Capture
|
||||
{
|
||||
if ($this->captureCount) {
|
||||
list($buffer, $assign, $append) = array_pop($this->captureStack);
|
||||
$this->captureCount --;
|
||||
$this->captureCount--;
|
||||
if (isset($assign)) {
|
||||
$_template->assign($assign, ob_get_contents());
|
||||
}
|
||||
@@ -165,5 +171,4 @@ class Smarty_Internal_Runtime_Capture
|
||||
$this->captureCount = array_pop($this->countStack);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user