/**
* Sets the encoding class to this node and propagates it
* to all its children.
*
* @param Encode $encode
*/
public function propagateEncoding(Encode $encode)
{
$this->encode = $encode;
$this->tag->setEncoding($encode);
// check children
foreach ($this->children as $id => $child) {
$child['node']->propagateEncoding($encode);
}
}