Collector

Collects tokens

class Collector
use LoggerAwareTrait
Copyright
2016 Appertly
License
Apache-2.0

Constructors / Destructors

Public
ReturnsSignature and Description
void
__construct(LoggerInterface $logger)

Create a new Collector.

Instance Methods

Public
ReturnsSignature and Description
ConstVector<ScannedBase>
collect(ConstVector<string> $arguments, ConstSet<string> $excludes)

Collect all tokens

Protected
ReturnsSignature and Description
ConstVector<ScannedBase>
parsePath(string $argument, LoggerInterface $log)

Method Details

__construct

public function __construct(LoggerInterface $logger)

Create a new Collector.

Parameters
NameTypeDescription
$loggerLoggerInterface

The logger

collect

public function collect(ConstVector<string> $arguments, ConstSet<string> $excludes)

Collect all tokens

Parameters
NameTypeDescription
$argumentsConstVector<string>

The list of files and directories to scan

$excludesConstSet<string>

The list of files and directories to exclude

Returns
TypeDescription
ConstVector<ScannedBase>

All tokens found

parsePath

protected function parsePath(string $argument, LoggerInterface $log)
Parameters
NameTypeDescription
$argumentstring
$logLoggerInterface
Returns
TypeDescription
ConstVector<ScannedBase>