| Conditions | 3 |
| Paths | 1 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function register(Application $app) |
||
| 24 | { |
||
| 25 | @trigger_error('The silex service provider is deprecated since 2.1 as Silex isn’t maintained anymore', E_USER_DEPRECATED); |
||
| 26 | |||
| 27 | $app['calendr'] = $app->share(function ($app) { |
||
| 28 | $calendr = new Calendar(); |
||
| 29 | $calendr->setEventManager($app['calendr.event_manager']); |
||
| 30 | |||
| 31 | return $calendr; |
||
| 32 | }); |
||
| 33 | |||
| 34 | $app['calendr.event_manager'] = $app->share(function ($app) { |
||
| 35 | return new Manager( |
||
| 36 | isset($app['calendr.event.providers']) ? $app['calendr.event.providers'] : array(), |
||
| 37 | isset($app['calendr.event.collection.instantiator']) ? $app['calendr.event.collection.instantiator'] : null |
||
| 38 | ); |
||
| 39 | }); |
||
| 40 | } |
||
| 41 | |||
| 57 |