1 | <?php |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
2 | |||
3 | namespace Gewaer\Providers; |
||
4 | |||
5 | use Phalcon\Di\ServiceProviderInterface; |
||
6 | use Phalcon\DiInterface; |
||
7 | use Pusher\Pusher; |
||
8 | |||
9 | class PusherProvider implements ServiceProviderInterface |
||
10 | { |
||
11 | /** |
||
12 | * @param DiInterface $container |
||
13 | */ |
||
14 | public function register(DiInterface $container) |
||
15 | { |
||
16 | $config = $container->getShared('config'); |
||
17 | |||
18 | $container->setShared( |
||
19 | 'pusher', |
||
20 | function () use ($config) { |
||
21 | return new Pusher($config->pusher->key, $config->pusher->secret, $config->pusher->id, ['cluster' => $config->pusher->cluster, 'useTLS' => true]); |
||
22 | } |
||
23 | ); |
||
24 | } |
||
25 | } |
||
26 |