
| Current Path : /var/www/html/dinarosun/vendor/chi-teck/drupal-code-generator/src/Event/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/dinarosun/vendor/chi-teck/drupal-code-generator/src/Event/GeneratorInfo.php |
<?php
declare(strict_types=1);
namespace DrupalCodeGenerator\Event;
use Symfony\Component\Console\Command\Command;
/**
* Fired when registering generators.
*/
final class GeneratorInfo {
/**
* @psalm-param list<\Symfony\Component\Console\Command\Command> $generators
*/
private array $generators = [];
/**
* Constructs the generator info object.
*
* The generators are passed by reference as there are no getters for them.
* That isolates data from listeners.
*
* @psalm-param list<\Symfony\Component\Console\Command\Command> $generators
*/
public function __construct(array &$generators) {
$this->generators = &$generators;
}
/**
* Adds generators.
*/
public function addGenerators(Command ...$generators): void {
$this->generators = \array_merge($this->generators, $generators);
}
}