src/CompiledTemplate.php
public final function render(OutputBuffer $out, ViewModelInterface $model, array $params = [])
	{
		$this->context->bind($model);
		$this->context->set('@view', $this);
		
		foreach($params as $k => $v)
		{
			$this->context->set($k, $v);
		}
		
		try
		{
			if($this->getParent() === NULL)
			{
				$this->renderMain($out);
			}
			else
			{
				$this->parent->renderMain($out);
			}

			return $out;
		}
		finally
		{
			$this->parent = false;
			$this->context->unbind();
		}
	}
public final function render(OutputBuffer $out, ViewModelInterface $model, array $params = [])
	{
		$this->context->bind($model);
		$this->context->set('@view', $this);
		
		foreach($params as $k => $v)
		{
			$this->context->set($k, $v);
		}
		
		try
		{
			if($this->getParent() === NULL)
			{
				$this->renderMain($out);
			}
			else
			{
				$this->parent->renderMain($out);
			}

			return $out;
		}
		finally
		{
			$this->parent = false;
			$this->context->unbind();
		}
	}
public final function render ( OutputBuffer $ out , ViewModelInterface $ model , array $ params = [ ] ) { $ this -> context -> bind ( $ model ) ; $ this -> context -> set ( '@view' , $ this ) ; foreach ( $ params as $ k => $ v ) { $ this -> context -> set ( $ k , $ v ) ; } try { if ( $ this -> getParent ( ) === NULL ) { $ this -> renderMain ( $ out ) ; } else { $ this -> parent -> renderMain ( $ out ) ; } return $ out ; } finally { $ this -> parent = false ; $ this -> context -> unbind ( ) ; } }
Bind to the given view model and render contents of the compiled view.

@param OutputBuffer $out
@param ViewModelInterface $model
@param array<string, mixed> $params
@return OutputBuffer $out
Bind to the given view model and render contents of the compiled view .