1 | <?php |
||
16 | abstract class Report implements ResourceCollectionReport |
||
17 | { |
||
18 | /** |
||
19 | * Status report |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $status = ReportBase::STATUS_NEW; |
||
23 | |||
24 | /** |
||
25 | * Flag update report and not read |
||
26 | * @var bool |
||
27 | */ |
||
28 | protected $isCompleted = false; |
||
29 | |||
30 | /** |
||
31 | * Disk for filesystem |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $disk = 'public'; |
||
35 | |||
36 | /** |
||
37 | * Get file name |
||
38 | * @return string |
||
39 | */ |
||
40 | abstract public function getFilename() : string; |
||
41 | |||
42 | /** |
||
43 | * Get title report |
||
44 | * @return string |
||
45 | */ |
||
46 | abstract public function getTitle() : string; |
||
47 | |||
48 | /** |
||
49 | * Get description report |
||
50 | * @return string |
||
51 | */ |
||
52 | abstract public function getDescription() : string; |
||
53 | |||
54 | /** |
||
55 | * @return array |
||
56 | */ |
||
57 | 1 | public function toArray() : array |
|
70 | |||
71 | /** |
||
72 | * Get path to file |
||
73 | * @return null|string |
||
74 | */ |
||
75 | 1 | public function getPathToFile() : ?string |
|
80 | |||
81 | /** |
||
82 | * Get date last modified file |
||
83 | * @return null|string |
||
84 | */ |
||
85 | 1 | public function getDateLastModified() : ?string |
|
90 | /** |
||
91 | * Get full class name |
||
92 | * @return string |
||
93 | */ |
||
94 | 1 | public function getNameClass() : string |
|
98 | |||
99 | /** |
||
100 | * Change is completed |
||
101 | * @param bool $flag |
||
102 | */ |
||
103 | 1 | public function changeCompleted(bool $flag) : void |
|
107 | |||
108 | /** |
||
109 | * @return bool |
||
110 | */ |
||
111 | 1 | public function getCompleted() : bool |
|
115 | /** |
||
116 | * Change status state report |
||
117 | * @param string $status |
||
118 | */ |
||
119 | 1 | public function changeStatus(string $status) : void |
|
123 | |||
124 | /** |
||
125 | * Get Model Report |
||
126 | * @return Model |
||
127 | */ |
||
128 | 3 | public function getReportModel() : Model |
|
132 | /** |
||
133 | * Get builder two parts string : |
||
134 | * Filename |
||
135 | * Extension |
||
136 | * @return string |
||
137 | */ |
||
138 | 2 | public function getFileNormalize() : string |
|
142 | |||
143 | /** |
||
144 | * @return array |
||
145 | */ |
||
146 | 1 | public function getListNotifications() : array |
|
153 | } |
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: