1 | <?php |
||
9 | abstract class BaseNotification extends Notification |
||
10 | { |
||
11 | /** |
||
12 | * Get the notification's delivery channels. |
||
13 | * |
||
14 | * @return array |
||
15 | */ |
||
16 | public function via() |
||
22 | |||
23 | public function applicationName(): string |
||
27 | |||
28 | public function applicationEnv(): string |
||
29 | { |
||
30 | return config('app.env') ? ' (' . config('app.env') . ')' : ''; |
||
31 | } |
||
32 | |||
33 | public function backupName(): string |
||
34 | { |
||
35 | return $this->backupDestination()->backupName(); |
||
36 | } |
||
37 | |||
38 | public function diskName(): string |
||
39 | { |
||
40 | return $this->backupDestination()->diskName(); |
||
41 | } |
||
42 | |||
43 | protected function backupDestinationProperties(): Collection |
||
65 | |||
66 | /** |
||
67 | * @return \Spatie\Backup\BackupDestination\BackupDestination|null |
||
68 | */ |
||
69 | public function backupDestination() |
||
79 | } |
||
80 |
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: