1 | <?php |
||
25 | class RegistrationRepository |
||
26 | { |
||
27 | /** |
||
28 | * Constructor |
||
29 | * |
||
30 | * @param ClientInterface $client Client object |
||
31 | */ |
||
32 | 1 | public function __construct(ClientInterface $client) |
|
36 | |||
37 | /** |
||
38 | * Adds registration |
||
39 | * |
||
40 | * @param array $registrations Array with several registrations |
||
41 | * |
||
42 | * @return ResponseInterface |
||
43 | */ |
||
44 | 1 | public function addRegistrations(array $registrations) |
|
48 | |||
49 | /** |
||
50 | * Gets new registrations |
||
51 | * |
||
52 | * @return ResponseInterface |
||
53 | */ |
||
54 | public function getNewRegistrations() |
||
58 | |||
59 | /** |
||
60 | * Gets handled registrations |
||
61 | * |
||
62 | * @return ResponseInterface |
||
63 | */ |
||
64 | public function getHandledRegistrations() |
||
68 | |||
69 | /** |
||
70 | * Deletes registration |
||
71 | * |
||
72 | * @throws Exception |
||
73 | * @return void |
||
74 | */ |
||
75 | public function delete() |
||
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: