19declare(strict_types=1);
34 if (!($activity instanceof
Activity)) {
35 throw new \InvalidArgumentException(
36 "Expected `Activity`, got: " . get_class($activity)
39 $this->activities[(string) $activity->getName()] = $activity;
45 foreach ($this->activities as $name => $activity) {
46 if (preg_match($name_matcher, $name)) {
47 yield $name => $activity;
__construct(array $activities)
getActivitiesByName(string $name_matcher, ?ActivityType $type=null, ?Range $range=null)
Get all activities where the name matches the provided regexp.
A simple class to express a naive range of whole positive numbers.
An Activity is an action on the domain layer action of a component.