public function addTag($tag, atoum\template $template)
{
$children = $template->getChildren();
while (($child = array_shift($children)) !== null) {
if ($child->getTag() === $tag) {
$this->tags[] = $child;
}
$children = array_merge($child->getChildren(), $children);
}
return $this;
}