1 | <?php |
||
5 | class RemoteFile |
||
6 | { |
||
7 | /** |
||
8 | * The relative path to the file. |
||
9 | * |
||
10 | * @var string |
||
11 | */ |
||
12 | protected $key; |
||
13 | |||
14 | /** |
||
15 | * The disk the file exists on. |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $disk; |
||
20 | |||
21 | /** |
||
22 | * Constructor method. |
||
23 | * |
||
24 | * @return void |
||
|
|||
25 | */ |
||
26 | public function __construct($key, $disk) |
||
31 | |||
32 | /** |
||
33 | * Get the key. |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | public function getKey(): string |
||
41 | |||
42 | /** |
||
43 | * Get the disk. |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getDisk(): string |
||
51 | |||
52 | /** |
||
53 | * Get the filename (including extension). |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getFilename() |
||
61 | |||
62 | /** |
||
63 | * Get the name (excluding extension). |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | public function getName() |
||
71 | } |
||
72 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.