- reformating for PSR-2 coding standards https://github.com/smarty-php/smarty/pull/483

This commit is contained in:
uwetews
2018-08-31 16:45:09 +02:00
parent d52a04fba1
commit 4f7cd8f1b3
177 changed files with 1905 additions and 1498 deletions
@@ -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);
}
}
}