buildEventName example

final class AsLeaveListener extends AsEventListener
{
    use BuildEventNameTrait;

    public function __construct(
        string $workflow = null,
        string $place = null,
        string $method = null,
        int $priority = 0,
        string $dispatcher = null,
    ) {
        parent::__construct($this->buildEventName('leave', 'place', $workflow$place)$method$priority$dispatcher);
    }
}
final class AsCompletedListener extends AsEventListener
{
    use BuildEventNameTrait;

    public function __construct(
        string $workflow = null,
        string $transition = null,
        string $method = null,
        int $priority = 0,
        string $dispatcher = null,
    ) {
        parent::__construct($this->buildEventName('completed', 'transition', $workflow$transition)$method$priority$dispatcher);
    }
}
final class AsEnterListener extends AsEventListener
{
    use BuildEventNameTrait;

    public function __construct(
        string $workflow = null,
        string $place = null,
        string $method = null,
        int $priority = 0,
        string $dispatcher = null,
    ) {
        parent::__construct($this->buildEventName('enter', 'place', $workflow$place)$method$priority$dispatcher);
    }
}
final class AsGuardListener extends AsEventListener
{
    use BuildEventNameTrait;

    public function __construct(
        string $workflow = null,
        string $transition = null,
        string $method = null,
        int $priority = 0,
        string $dispatcher = null,
    ) {
        parent::__construct($this->buildEventName('guard', 'transition', $workflow$transition)$method$priority$dispatcher);
    }
}
final class AsTransitionListener extends AsEventListener
{
    use BuildEventNameTrait;

    public function __construct(
        string $workflow = null,
        string $transition = null,
        string $method = null,
        int $priority = 0,
        string $dispatcher = null,
    ) {
        parent::__construct($this->buildEventName('transition', 'transition', $workflow$transition)$method$priority$dispatcher);
    }
}
final class AsAnnounceListener extends AsEventListener
{
    use BuildEventNameTrait;

    public function __construct(
        string $workflow = null,
        string $transition = null,
        string $method = null,
        int $priority = 0,
        string $dispatcher = null,
    ) {
        parent::__construct($this->buildEventName('announce', 'transition', $workflow$transition)$method$priority$dispatcher);
    }
}
final class AsEnteredListener extends AsEventListener
{
    use BuildEventNameTrait;

    public function __construct(
        string $workflow = null,
        string $place = null,
        string $method = null,
        int $priority = 0,
        string $dispatcher = null,
    ) {
        parent::__construct($this->buildEventName('entered', 'place', $workflow$place)$method$priority$dispatcher);
    }
}
$finder = new Finder();
        $finder
            ->in($paths)
            ->files()
            ->name('*.php');

        foreach (self::MODULES as $module) {
            $finder->path($module);
        }

        foreach ($finder as $file) {
            $eventName = $this->buildEventName(
                $file->getPathInfo()->getBasename(),
                $file->getBasename('.php')
            );
            $controllers[$eventName] = $file->getPathname();
        }

        return $controllers;
    }

    /** * @param Plugin[] $actives * * @return string[] */
Home | Imprint | This part of the site doesn't use cookies.