Gregwar\RST\Parser::getKernel PHP Method

getKernel() public method

Get the current kernel
public getKernel ( ) : Kernel
return Kernel the kernel
    public function getKernel()
    {
        return $this->kernel;
    }

Usage Example

コード例 #1
0
ファイル: Toctree.php プロジェクト: cmsilex/rst
 public function process(Parser $parser, $node, $variable, $data, array $options)
 {
     $environment = $parser->getEnvironment();
     $kernel = $parser->getKernel();
     $files = array();
     foreach (explode("\n", $node->getValue()) as $file) {
         $file = trim($file);
         if ($file) {
             $environment->addDependency($file);
             $files[] = $file;
         }
     }
     $document = $parser->getDocument();
     $document->addNode($kernel->build('Nodes\\TocNode', $files, $environment, $options));
 }
All Usage Examples Of Gregwar\RST\Parser::getKernel