GrumPHP\Parser\Php\Configurator\TraverserConfigurator::registerContext PHP Method

registerContext() public method

public registerContext ( ParserContext $context )
$context GrumPHP\Parser\Php\Context\ParserContext
    public function registerContext(ParserContext $context)
    {
        $this->context = $context;
    }

Usage Example

Example #1
0
 /**
  * @param array         $parserOptions
  * @param ParserContext $context
  *
  * @return NodeTraverser
  * @throws \GrumPHP\Exception\RuntimeException
  */
 public function createForTaskContext(array $parserOptions, ParserContext $context)
 {
     $this->configurator->registerOptions($parserOptions);
     $this->configurator->registerContext($context);
     $traverser = new NodeTraverser();
     $this->configurator->configure($traverser);
     return $traverser;
 }
All Usage Examples Of GrumPHP\Parser\Php\Configurator\TraverserConfigurator::registerContext