Final Class Yiisoft\Yii\Debug\Collector\Stream\FilesystemStreamCollector
| Inheritance | Yiisoft\Yii\Debug\Collector\Stream\FilesystemStreamCollector |
|---|---|
| Implements | Yiisoft\Yii\Debug\Collector\SummaryCollectorInterface |
| Uses Traits | Yiisoft\Yii\Debug\Collector\CollectorTrait |
Public Methods
Method Details
| public mixed __construct ( array $ignoredPathPatterns = [], array $ignoredClasses = [] ) | ||
| $ignoredPathPatterns | array | |
| $ignoredClasses | array | |
public function __construct(
/**
* Collection of regexps to ignore files sources to sniff.
* Examples:
* - '/' . preg_quote('yii-debug/src/Dumper', '/') . '/'
* - '/ClosureExporter/'
*
* @var string[]
*/
private readonly array $ignoredPathPatterns = [],
/**
* @var string[]
*/
private readonly array $ignoredClasses = [],
) {
}
| public void collect ( string $operation, string $path, array $args ) | ||
| $operation | string | |
| $path | string | |
| $args | array | |
public function collect(string $operation, string $path, array $args): void
{
if (!$this->isActive()) {
return;
}
$this->operations[$operation][] = [
'path' => $path,
'args' => $args,
];
}
| public array getCollected ( ) |
public function getCollected(): array
{
return $this->isActive() ? $this->operations : [];
}
| public array getSummary ( ) |
public function getSummary(): array
{
if (!$this->isActive()) {
return [];
}
return [
'streams' => array_merge(
...array_map(
fn (string $operation) => [$operation => count($this->operations[$operation])],
array_keys($this->operations)
)
),
];
}
| public void shutdown ( ) |
public function shutdown(): void
{
FilesystemStreamProxy::unregister();
FilesystemStreamProxy::$collector = null;
FilesystemStreamProxy::$ignoredPathPatterns = [];
FilesystemStreamProxy::$ignoredClasses = [];
$this->reset();
$this->isActive = false;
}
Signup or Login in order to comment.