PluginProbe
Disk Usage Insights / 1.2
Disk Usage Insights v1.2
trunk 1.0 1.10 1.11 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9
disk-usage-insights / src / Domain / Jobs / BaseJob.php

BaseJob.php in Disk Usage Insights 1.2, at src/Domain/Jobs/BaseJob.php

36 lines 916 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Mgleis\DiskUsageInsights\Domain\Jobs;
4
5 use Mgleis\DiskUsageInsights\Domain\FileEntryRepository;
6 use Mgleis\DiskUsageInsights\Domain\SnapshotRepository;
7 use Mgleis\PhpSqliteJobQueue\Queue;
8
9 class BaseJob {
10 protected Queue $queue;
11 protected FileEntryRepository $fileEntryRepository;
12 protected SnapshotRepository $snapshotRepository;
13
14 public function setQueue(Queue $q) {
15 $this->queue = $q;
16 }
17
18 public function setFileEntryRepository(FileEntryRepository $fileEntryRepository) {
19 $this->fileEntryRepository = $fileEntryRepository;
20 }
21
22 public function setSnapshotRepository(SnapshotRepository $snapshotRepository) {
23 $this->snapshotRepository = $snapshotRepository;
24 }
25
26 protected function log(string $s) {
27 echo $s."\n";
28 //error_log($s);
29 }
30
31 public function toDescription(): string {
32 return static::class;
33 }
34
35 }
36