public function endTask()
{
$name = array_pop($this->taskStack);
$contents = trim(ob_get_clean());
if (isset($this->tasks[$name])) {
$this->tasks[$name] = str_replace('@parent', $this->tasks[$name], $contents);
} else {
$this->tasks[$name] = $contents;
}
}