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\Contracts\Broadcasting\HasBroadcastChannel;
6
 
7
class Channel
8
{
9
    /**
10
     * The channel's name.
11
     *
12
     * @var string
13
     */
14
    public $name;
15
 
16
    /**
17
     * Create a new channel instance.
18
     *
19
     * @param  \Illuminate\Contracts\Broadcasting\HasBroadcastChannel|string  $name
20
     * @return void
21
     */
22
    public function __construct($name)
23
    {
24
        $this->name = $name instanceof HasBroadcastChannel ? $name->broadcastChannel() : $name;
25
    }
26
 
27
    /**
28
     * Convert the channel instance to a string.
29
     *
30
     * @return string
31
     */
32
    public function __toString()
33
    {
34
        return $this->name;
35
    }
36
}