/**
  * called at compile time to define what the block should output in the compiled template code, happens when the block is declared
  * basically this will replace the {block arg arg arg} tag in the template
  * @param Compiler $compiler the compiler instance that calls this function
  * @param array    $params   an array containing original and compiled parameters
  * @param string   $prepend  that is just meant to allow a child class to call
  *                           parent::postProcessing($compiler, $params, "foo();") to add a command before the
  *                           default commands are executed
  * @param string   $append   that is just meant to allow a child class to call
  *                           parent::postProcessing($compiler, $params, null, "foo();") to add a command after the
  *                           default commands are executed
  * @param string   $type     the type is the plugin class name used
  *
  * @return string
  */
 public static function preProcessing(Compiler $compiler, array $params, $prepend, $append, $type)
 {
     return Compiler::PHP_OPEN . $prepend . '$this->addStack("' . $type . '", array(' . Compiler::implode_r($compiler->getCompiledParams($params)) . '));' . $append . Compiler::PHP_CLOSE;
 }
 /**
  * returns the code (as a string) to call the plugin
  * (this will be executed at runtime inside the Dwoo class)
  *
  * @param string $name the plugin name
  * @param array $params a parameter array, array key "*" is the rest array
  * @return string
  */
 public function getCode($name, $params)
 {
     return '$this->getPluginProxy()->view->' . $name . '(' . Compiler::implode_r($params) . ')';
 }