Exemplo n.º 1
0
 /**
  * Dump filter node. 
  * 
  * @param   FilterNode  $node   filter node
  * @param   integer     $level  indentation level
  * 
  * @return  string
  */
 protected function dumpFilter(FilterNode $node, $level = 0)
 {
     if (!isset($this->filters[$node->getName()])) {
         throw new Exception(sprintf('Filter with alias "%s" is not registered.', $node->getName()));
     }
     $text = '';
     if ($node->getBlock()) {
         $text = $this->dumpNode($node->getBlock(), $level + 1);
     }
     return $this->filters[$node->getName()]->filter($text, $node->getAttributes(), str_repeat(' ', $level * $this->options['tabSize']));
 }