@@ -66,10 +66,9 @@ public function __construct(ConfigurationOptionInterface $config, string $instan
6666 $ this ->setEventManager ($ em );
6767 $ this ->setConfig ($ config );
6868 $ this ->instanceId = $ instanceId ;
69- $ this ->IO = new DriverIO ();
7069
7170 if (!$ this ->driverCheck ()) {
72- throw new PhpfastcacheDriverCheckException (\sprintf (self ::DRIVER_CHECK_FAILURE , $ this ->getDriverName ()));
71+ throw new PhpfastcacheDriverCheckException (\sprintf (ExtendedCacheItemPoolInterface ::DRIVER_CHECK_FAILURE , $ this ->getDriverName ()));
7372 }
7473
7574 try {
@@ -78,7 +77,7 @@ public function __construct(ConfigurationOptionInterface $config, string $instan
7877 } catch (Throwable $ e ) {
7978 throw new PhpfastcacheDriverConnectException (
8079 sprintf (
81- self ::DRIVER_CONNECT_FAILURE ,
80+ ExtendedCacheItemPoolInterface ::DRIVER_CONNECT_FAILURE ,
8281 $ e ::class,
8382 $ this ->getDriverName (),
8483 $ e ->getMessage (),
@@ -145,8 +144,8 @@ public function driverPreWrap(ExtendedCacheItemInterface $item, bool $stringifyD
145144 $ wrap = [
146145 ExtendedCacheItemPoolInterface::DRIVER_KEY_WRAPPER_INDEX => $ item ->getKey (), // Stored but not really used, allow you to quickly identify the cache key
147146 ExtendedCacheItemPoolInterface::DRIVER_DATA_WRAPPER_INDEX => $ item ->getRawValue (),
147+ ExtendedCacheItemPoolInterface::DRIVER_EDATE_WRAPPER_INDEX => $ item ->getExpirationDate (),
148148 TaggableCacheItemPoolInterface::DRIVER_TAGS_WRAPPER_INDEX => $ item ->getTags (),
149- self ::DRIVER_EDATE_WRAPPER_INDEX => $ item ->getExpirationDate (),
150149 ];
151150
152151 if ($ this ->getConfig ()->isItemDetailedDate ()) {
@@ -207,11 +206,11 @@ public function driverUnwrapData(array $wrapper): mixed
207206 */
208207 public function driverUnwrapEdate (array $ wrapper ): \DateTimeInterface
209208 {
210- if ($ wrapper [self ::DRIVER_EDATE_WRAPPER_INDEX ] instanceof \DateTimeInterface) {
211- return $ wrapper [self ::DRIVER_EDATE_WRAPPER_INDEX ];
209+ if ($ wrapper [ExtendedCacheItemPoolInterface ::DRIVER_EDATE_WRAPPER_INDEX ] instanceof \DateTimeInterface) {
210+ return $ wrapper [ExtendedCacheItemPoolInterface ::DRIVER_EDATE_WRAPPER_INDEX ];
212211 }
213212
214- return DateTime::createFromFormat (\DateTimeInterface::W3C , $ wrapper [self ::DRIVER_EDATE_WRAPPER_INDEX ]);
213+ return DateTime::createFromFormat (\DateTimeInterface::W3C , $ wrapper [ExtendedCacheItemPoolInterface ::DRIVER_EDATE_WRAPPER_INDEX ]);
215214 }
216215
217216 /**
@@ -220,11 +219,11 @@ public function driverUnwrapEdate(array $wrapper): \DateTimeInterface
220219 */
221220 public function driverUnwrapCdate (array $ wrapper ): ?\DateTimeInterface
222221 {
223- if ($ wrapper [self ::DRIVER_CDATE_WRAPPER_INDEX ] instanceof \DateTimeInterface) {
224- return $ wrapper [self ::DRIVER_CDATE_WRAPPER_INDEX ];
222+ if ($ wrapper [ExtendedCacheItemPoolInterface ::DRIVER_CDATE_WRAPPER_INDEX ] instanceof \DateTimeInterface) {
223+ return $ wrapper [ExtendedCacheItemPoolInterface ::DRIVER_CDATE_WRAPPER_INDEX ];
225224 }
226225
227- return DateTime::createFromFormat (\DateTimeInterface::W3C , $ wrapper [self ::DRIVER_CDATE_WRAPPER_INDEX ]);
226+ return DateTime::createFromFormat (\DateTimeInterface::W3C , $ wrapper [ExtendedCacheItemPoolInterface ::DRIVER_CDATE_WRAPPER_INDEX ]);
228227 }
229228
230229 /**
@@ -233,11 +232,11 @@ public function driverUnwrapCdate(array $wrapper): ?\DateTimeInterface
233232 */
234233 public function driverUnwrapMdate (array $ wrapper ): ?\DateTimeInterface
235234 {
236- if ($ wrapper [self ::DRIVER_MDATE_WRAPPER_INDEX ] instanceof \DateTimeInterface) {
237- return $ wrapper [self ::DRIVER_MDATE_WRAPPER_INDEX ];
235+ if ($ wrapper [ExtendedCacheItemPoolInterface ::DRIVER_MDATE_WRAPPER_INDEX ] instanceof \DateTimeInterface) {
236+ return $ wrapper [ExtendedCacheItemPoolInterface ::DRIVER_MDATE_WRAPPER_INDEX ];
238237 }
239238
240- return DateTime::createFromFormat (\DateTimeInterface::W3C , $ wrapper [self ::DRIVER_MDATE_WRAPPER_INDEX ]);
239+ return DateTime::createFromFormat (\DateTimeInterface::W3C , $ wrapper [ExtendedCacheItemPoolInterface ::DRIVER_MDATE_WRAPPER_INDEX ]);
241240 }
242241
243242 /**
0 commit comments