Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Broadcasting;
4
 
5
use Illuminate\Support\Arr;
6
 
7
trait InteractsWithBroadcasting
8
{
9
    /**
10
     * The broadcaster connection to use to broadcast the event.
11
     *
12
     * @var array
13
     */
14
    protected $broadcastConnection = [null];
15
 
16
    /**
17
     * Broadcast the event using a specific broadcaster.
18
     *
19
     * @param  array|string|null  $connection
20
     * @return $this
21
     */
22
    public function broadcastVia($connection = null)
23
    {
24
        $this->broadcastConnection = is_null($connection)
25
                        ? [null]
26
                        : Arr::wrap($connection);
27
 
28
        return $this;
29
    }
30
 
31
    /**
32
     * Get the broadcaster connections the event should be broadcast on.
33
     *
34
     * @return array
35
     */
36
    public function broadcastConnections()
37
    {
38
        return $this->broadcastConnection;
39
    }
40
}