original_string: public function compile(Buffer $buffer)
      {
          parent::compile($buffer);
          if (substr($this->getName(), 0, 1) !== '_') {
              $buffer
                  ->writeln('try {')
                  ->indent(1)
                      ->writeln('$z->addCommand(')
                      ->indent(1)
                          ->write('new \Zicht\Tool\Command\TaskCommand(')
                          ->asPhp($this->getName())
                          ->raw(', ')
                          ->asPhp($this->getArguments(true))
                          ->raw(', ')
                          ->asPhp($this->getOptions())
                          ->raw(', ')
                          ->asPhp($this->taskDef['flags'])
                          ->raw(', ')
                          ->asPhp($this->getHelp() ? $this->getHelp() : "(no help available for this task)")
                          ->raw(')')->eol()
                          ->indent(-1)
                      ->writeln(');')
                      ->indent(-1)
                  ->writeln('} catch (\Exception $e) {')
                      ->indent(1)
                      ->writeln('throw new \Zicht\Tool\Container\ConfigurationException("Error while initializing task \'' . $this->getName() . '\'", 0, $e);')
                      ->indent(-1)
                  ->writeln('}')
              ;
          }
      }
code: public function compile(Buffer $buffer)
      {
          parent::compile($buffer);
          if (substr($this->getName(), 0, 1) !== '_') {
              $buffer
                  ->writeln('try {')
                  ->indent(1)
                      ->writeln('$z->addCommand(')
                      ->indent(1)
                          ->write('new \Zicht\Tool\Command\TaskCommand(')
                          ->asPhp($this->getName())
                          ->raw(', ')
                          ->asPhp($this->getArguments(true))
                          ->raw(', ')
                          ->asPhp($this->getOptions())
                          ->raw(', ')
                          ->asPhp($this->taskDef['flags'])
                          ->raw(', ')
                          ->asPhp($this->getHelp() ? $this->getHelp() : "(no help available for this task)")
                          ->raw(')')->eol()
                          ->indent(-1)
                      ->writeln(');')
                      ->indent(-1)
                  ->writeln('} catch (\Exception $e) {')
                      ->indent(1)
                      ->writeln('throw new \Zicht\Tool\Container\ConfigurationException("Error while initializing task \'' . $this->getName() . '\'", 0, $e);')
                      ->indent(-1)
                  ->writeln('}')
              ;
          }
      }
code_tokens: public function compile ( Buffer $ buffer ) { parent :: compile ( $ buffer ) ; if ( substr ( $ this -> getName ( ) , 0 , 1 ) !== '_' ) { $ buffer -> writeln ( 'try {' ) -> indent ( 1 ) -> writeln ( '$z->addCommand(' ) -> indent ( 1 ) -> write ( 'new \Zicht\Tool\Command\TaskCommand(' ) -> asPhp ( $ this -> getName ( ) ) -> raw ( ', ' ) -> asPhp ( $ this -> getArguments ( true ) ) -> raw ( ', ' ) -> asPhp ( $ this -> getOptions ( ) ) -> raw ( ', ' ) -> asPhp ( $ this -> taskDef [ 'flags' ] ) -> raw ( ', ' ) -> asPhp ( $ this -> getHelp ( ) ? $ this -> getHelp ( ) : "(no help available for this task)" ) -> raw ( ')' ) -> eol ( ) -> indent ( - 1 ) -> writeln ( ');' ) -> indent ( - 1 ) -> writeln ( '} catch (\Exception $e) {' ) -> indent ( 1 ) -> writeln ( 'throw new \Zicht\Tool\Container\ConfigurationException("Error while initializing task \'' . $ this -> getName ( ) . '\'", 0, $e);' ) -> indent ( - 1 ) -> writeln ( '}' ) ; } }
docstring: Compiles the task initialization code into the buffer.
  
  @param \Zicht\Tool\Script\Buffer $buffer
  @return void
docstring_tokens: Compiles the task initialization code into the buffer .