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();
		}
	}