PHP Class Psecio\Parse\Scanner

Inheritance: implements Psecio\Parse\Event\Events
Show file Open project: psecio/parse Class Usage Examples

Public Methods

Method Description
__construct ( Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher, Psecio\Parse\CallbackVisitor $visitor, PhpParser\Parser $parser = null, NodeTraverser $traverser = null ) Optionally inject parser
onNodeFailure ( Psecio\Parse\RuleInterface $rule, PhpParser\Node $node, Psecio\Parse\File $file ) : void Node fail callback
scan ( FileIterator $fileIterator ) : void Execute the scan

Method Details

__construct() public method

Optionally inject parser
public __construct ( Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher, Psecio\Parse\CallbackVisitor $visitor, PhpParser\Parser $parser = null, NodeTraverser $traverser = null )
$dispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$visitor Psecio\Parse\CallbackVisitor
$parser PhpParser\Parser
$traverser PhpParser\NodeTraverser

onNodeFailure() public method

Node fail callback
public onNodeFailure ( Psecio\Parse\RuleInterface $rule, PhpParser\Node $node, Psecio\Parse\File $file ) : void
$rule Psecio\Parse\RuleInterface
$node PhpParser\Node
$file Psecio\Parse\File
return void

scan() public method

Execute the scan
public scan ( FileIterator $fileIterator ) : void
$fileIterator FileIterator Iterator with files to scan
return void