Projekt

Obecné

Profil

Stáhnout (1.19 KB) Statistiky
| Větev: | Revize:
1 cb15593b Cajova-Houba
<?php
2
3
namespace Illuminate\Broadcasting;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class BroadcastServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Indicates if loading of the provider is deferred.
11
     *
12
     * @var bool
13
     */
14
    protected $defer = true;
15
16
    /**
17
     * Register the service provider.
18
     *
19
     * @return void
20
     */
21
    public function register()
22
    {
23
        $this->app->singleton('Illuminate\Broadcasting\BroadcastManager', function ($app) {
24
            return new BroadcastManager($app);
25
        });
26
27
        $this->app->singleton('Illuminate\Contracts\Broadcasting\Broadcaster', function ($app) {
28
            return $app->make('Illuminate\Broadcasting\BroadcastManager')->connection();
29
        });
30
31
        $this->app->alias(
32
            'Illuminate\Broadcasting\BroadcastManager', 'Illuminate\Contracts\Broadcasting\Factory'
33
        );
34
    }
35
36
    /**
37
     * Get the services provided by the provider.
38
     *
39
     * @return array
40
     */
41
    public function provides()
42
    {
43
        return [
44
            'Illuminate\Broadcasting\BroadcastManager',
45
            'Illuminate\Contracts\Broadcasting\Factory',
46
            'Illuminate\Contracts\Broadcasting\Broadcaster',
47
        ];
48
    }
49
}