1 | <?php |
||
29 | class Driver implements ExtendedCacheItemPoolInterface |
||
30 | { |
||
31 | use DriverBaseTrait; |
||
32 | /** |
||
33 | * Driver constructor. |
||
34 | * @param array $config |
||
35 | * @throws phpFastCacheDriverException |
||
36 | */ |
||
37 | public function __construct(array $config = []) |
||
45 | |||
46 | /** |
||
47 | * @return bool |
||
48 | */ |
||
49 | public function driverCheck() |
||
57 | |||
58 | /** |
||
59 | * @param \Psr\Cache\CacheItemInterface $item |
||
60 | * @return mixed |
||
61 | * @throws phpFastCacheInvalidArgumentException |
||
62 | */ |
||
63 | protected function driverWrite(CacheItemInterface $item) |
||
76 | |||
77 | /** |
||
78 | * @param \Psr\Cache\CacheItemInterface $item |
||
79 | * @return mixed |
||
80 | */ |
||
81 | protected function driverRead(CacheItemInterface $item) |
||
90 | |||
91 | /** |
||
92 | * @param \Psr\Cache\CacheItemInterface $item |
||
93 | * @return bool |
||
94 | * @throws phpFastCacheInvalidArgumentException |
||
95 | */ |
||
96 | protected function driverDelete(CacheItemInterface $item) |
||
107 | |||
108 | /** |
||
109 | * @return bool |
||
110 | */ |
||
111 | protected function driverClear() |
||
115 | |||
116 | /** |
||
117 | * @return bool |
||
118 | */ |
||
119 | protected function driverConnect() |
||
123 | |||
124 | /******************** |
||
125 | * |
||
126 | * PSR-6 Extended Methods |
||
127 | * |
||
128 | *******************/ |
||
129 | |||
130 | /** |
||
131 | * @return string |
||
132 | */ |
||
133 | public static function getHelp() |
||
141 | |||
142 | /** |
||
143 | * @return driverStatistic |
||
144 | */ |
||
145 | public function getStats() |
||
154 | } |
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: