Crunz\EventRunner::handle PHP Method

handle() public method

Handle an array of Schedule objects
public handle ( array $schedules = [] )
$schedules array
    public function handle(array $schedules = [])
    {
        $this->schedules = $schedules;
        foreach ($this->schedules as $schedule) {
            // Running the before-callbacks of the current schedule
            $this->invoke($schedule->beforeCallbacks());
            $events = $schedule->events();
            foreach ($events as $event) {
                $this->start($event);
            }
        }
        // Watch events until they are finished
        $this->ManageStartedEvents();
    }