ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
NonPersistingObserver.php
Go to the documentation of this file.
1<?php
2
20
24
31{
32 public function __construct(protected Bucket $bucket)
33 {
34 }
35
39 public function notifyState(int $state): void
40 {
41 $this->bucket->heartbeat();
42 $this->bucket->setState($state);
43 }
44
45 public function notifyPercentage(Task $task, int $percentage): void
46 {
47 $this->bucket->heartbeat();
48 $this->bucket->setPercentage($task, $percentage);
49 }
50
51 public function notifyCurrentTask(Task $task): void
52 {
53 $this->bucket->heartbeat();
54 $this->bucket->setCurrentTask($task);
55 }
56
61 public function heartbeat(): void
62 {
63 $this->bucket->heartbeat();
64 }
65}
notifyPercentage(Task $task, int $percentage)
You can change the progress of a currently running task.
notifyCurrentTask(Task $task)
If the current task changes notify the observer.
heartbeat()
I'm still alive! If your calculation takes a really long time don't forget to use the heartbeat.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Job.php:19