19 declare(strict_types=1);
33 foreach ($activities as $activity) {
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;
getActivitiesByName(string $name_matcher, ?ActivityType $type=null, ?Range $range=null)
Get all activities where the name matches the provided regexp.
__construct(array $activities)
An Activity is an action on the domain layer action of a component.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
A simple class to express a naive range of whole positive numbers.