@@ -27,9 +27,9 @@ public function __construct(Cache $cache)
2727 }
2828
2929 /**
30- * @param \Symfony\Component\HttpFoundation\Request $request
30+ * @param \Symfony\Component\HttpFoundation\Request $request
3131 * @param \Symfony\Component\HttpFoundation\Response $response
32- * @param \Exception|null $exception
32+ * @param \Exception|null $exception
3333 */
3434 public function collect (Request $ request , Response $ response , \Exception $ exception = null )
3535 {
@@ -43,55 +43,81 @@ public function collect(Request $request, Response $response, \Exception $except
4343 if ($ cache ->getStats ()->getSize ()) {
4444 $ size += $ cache ->getStats ()->getSize ();
4545 }
46- $ stats [$ instanceName ] = $ cache ->getStats ();
47- $ instances [$ instanceName ] = [
46+ $ stats [ $ instanceName ] = $ cache ->getStats ();
47+ $ instances [ $ instanceName ] = [
4848 'driverName ' => $ cache ->getDriverName (),
49- 'driverConfig ' => $ cache ->getConfig ()
49+ 'driverConfig ' => $ cache ->getConfig (),
5050 ];
51- $ driverUsed [$ cache ->getDriverName ()] = get_class ($ cache );
51+ $ driverUsed [ $ cache ->getDriverName () ] = get_class ($ cache );
5252 }
5353
5454 $ this ->data = [
5555 'driverUsed ' => $ driverUsed ,
5656 'instances ' => $ instances ,
5757 'stats ' => $ stats ,
58- 'size ' => $ size ,
58+ 'size ' => $ size ,
5959 'hits ' => [
60- 'read ' => (int ) CacheManager::$ ReadHits ,
61- 'write ' => (int ) CacheManager::$ WriteHits ,
62- ]
60+ 'read ' => (int ) CacheManager::$ ReadHits ,
61+ 'write ' => (int ) CacheManager::$ WriteHits ,
62+ ],
63+ 'coreConfig ' => [
64+ 'namespacePath ' => CacheManager::getNamespacePath ()
65+ ],
6366 ];
6467 }
6568
69+ /**
70+ * @return mixed
71+ */
6672 public function getStats ()
6773 {
68- return $ this ->data ['stats ' ];
74+ return $ this ->data [ 'stats ' ];
6975 }
7076
77+ /**
78+ * @return mixed
79+ */
7180 public function getInstances ()
7281 {
73- return $ this ->data ['instances ' ];
82+ return $ this ->data [ 'instances ' ];
7483 }
7584
85+ /**
86+ * @return mixed
87+ */
7688 public function getDriverUsed ()
7789 {
78- return $ this ->data ['driverUsed ' ];
90+ return $ this ->data [ 'driverUsed ' ];
7991 }
8092
93+ /**
94+ * @return mixed
95+ */
8196 public function getHits ()
8297 {
83- return $ this ->data ['hits ' ];
98+ return $ this ->data [ 'hits ' ];
8499 }
85100
101+ /**
102+ * @return mixed
103+ */
86104 public function getSize ()
87105 {
88- /**
89- * @var $name
90- * @var ExtendedCacheItemPoolInterface $cache
91- */
92- return $ this ->data ['size ' ];
106+ return $ this ->data [ 'size ' ];
93107 }
94108
109+ /**
110+ * @return mixed
111+ */
112+ public function getCoreConfig ()
113+ {
114+ return $ this ->data [ 'coreConfig ' ];
115+ }
116+
117+
118+ /**
119+ * @return string
120+ */
95121 public function getName ()
96122 {
97123 return 'phpfastcache ' ;
0 commit comments