File tree Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Original file line number Diff line number Diff line change 1313 ],
1414 "require" : {
1515 "php" : " >=5.3.3" ,
16- "silex/silex" : " ~1 .0" ,
16+ "silex/silex" : " ^2 .0" ,
1717 "doctrine/cache" : " ~1.0"
1818 },
1919 "minimum-stability" : " dev" ,
Original file line number Diff line number Diff line change 22
33namespace CHH \Silex ;
44
5- use Silex \ Application ;
6- use Silex \ServiceProviderInterface ;
5+ use Pimple \ Container ;
6+ use Pimple \ServiceProviderInterface ;
77use Doctrine \Common \Cache \Cache ;
88use CHH \Silex \CacheServiceProvider \CacheNamespace ;
99
1010class CacheServiceProvider implements ServiceProviderInterface
1111{
12- function register (Application $ app )
12+ function register (Container $ app )
1313 {
1414 $ app ['cache.factory ' ] = $ app ->protect (function ($ options ) {
1515 return function () use ($ options ) {
@@ -89,23 +89,19 @@ function register(Application $app)
8989 };
9090 });
9191
92- $ app ['cache ' ] = $ app -> share ( function ($ app ) {
92+ $ app ['cache ' ] = function ($ app ) {
9393 $ factory = $ app ['cache.factory ' ]($ app ['cache.options ' ]['default ' ]);
9494 return $ factory ();
95- }) ;
95+ };
9696
97- $ app ['caches ' ] = $ app -> share ( function ($ app ) {
98- $ caches = new \ Pimple ;
97+ $ app ['caches ' ] = function ($ app ) {
98+ $ caches = new Container ;
9999
100100 foreach ($ app ['cache.options ' ] as $ cache => $ options ) {
101- $ caches [$ cache ] = $ app-> share ( $ app ['cache.factory ' ]($ options) );
101+ $ caches [$ cache ] = $ app ['cache.factory ' ]($ options );
102102 }
103103
104104 return $ caches ;
105- });
106- }
107-
108- function boot (Application $ app )
109- {
105+ };
110106 }
111107}
You can’t perform that action at this time.
0 commit comments