| 1 | <?php  | 
            ||
| 9 | class Schedule  | 
            ||
| 10 | { | 
            ||
| 11 | /**  | 
            ||
| 12 | * Stack of events  | 
            ||
| 13 | * @var Event[]  | 
            ||
| 14 | */  | 
            ||
| 15 | protected $events = [];  | 
            ||
| 16 | |||
| 17 | /**  | 
            ||
| 18 | * @var string|null  | 
            ||
| 19 | */  | 
            ||
| 20 | protected $name;  | 
            ||
| 21 | |||
| 22 | public function __construct(/* string */ $name = null)  | 
            ||
| 28 | |||
| 29 | /**  | 
            ||
| 30 | * Get the name of this schedule  | 
            ||
| 31 | *  | 
            ||
| 32 | * @return string|null  | 
            ||
| 33 | */  | 
            ||
| 34 | public function getName()  | 
            ||
| 38 | |||
| 39 | /**  | 
            ||
| 40 | * Creates a new Event, adds it to the schedule stack and returns you the instance so you can configure it  | 
            ||
| 41 | *  | 
            ||
| 42 | * @param string $command  | 
            ||
| 43 | * @return Event  | 
            ||
| 44 | */  | 
            ||
| 45 | public function run(/* string */ $command)  | 
            ||
| 52 | |||
| 53 | /**  | 
            ||
| 54 | * @return Event[]  | 
            ||
| 55 | */  | 
            ||
| 56 | public function allEvents()  | 
            ||
| 60 | |||
| 61 | /**  | 
            ||
| 62 | * Get all of the events on the schedule that are due.  | 
            ||
| 63 | *  | 
            ||
| 64 | * @return Event[]  | 
            ||
| 65 | */  | 
            ||
| 66 | public function dueEvents()  | 
            ||
| 72 | }  | 
            ||
| 73 |