1 | <?php |
||
9 | abstract class Job |
||
10 | { |
||
11 | protected $app; |
||
12 | |||
13 | 7 | public function __construct(Application $app) |
|
17 | |||
18 | protected function confirm($message) |
||
29 | |||
30 | 1 | public function create(string $space, array $data) : Entity |
|
34 | |||
35 | 1 | public function dispatch(string $job, array $params = [], string $service = null) |
|
39 | |||
40 | public function fire(string $event, array $context) |
||
44 | |||
45 | 1 | public function get(string $class) |
|
49 | |||
50 | 1 | public function find(string $space, $params = []) : array |
|
54 | |||
55 | 1 | public function findOrCreate(string $space, $params = []) : Entity |
|
59 | |||
60 | 1 | public function findOne(string $space, $params = []) : ?Entity |
|
64 | |||
65 | 1 | public function findOrFail(string $space, $params = []) : Entity |
|
69 | |||
70 | 1 | public function remove(string $space, array $params = []) |
|
74 | |||
75 | public function __debugInfo() |
||
81 | } |
||
82 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: