wip
This commit is contained in:
parent
c6c65fde8a
commit
20b92fddfc
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace BeyondCode\LaravelWebSockets\LaravelEcho\Pusher\Channels;
|
namespace BeyondCode\LaravelWebSockets\LaravelEcho\Pusher\Channels;
|
||||||
|
|
||||||
|
use ReflectionClass;
|
||||||
use Ratchet\ConnectionInterface;
|
use Ratchet\ConnectionInterface;
|
||||||
|
|
||||||
class ChannelManager
|
class ChannelManager
|
||||||
|
|
@ -16,10 +16,7 @@ class ChannelManager
|
||||||
public function findOrCreate(string $appId, string $channelId): Channel
|
public function findOrCreate(string $appId, string $channelId): Channel
|
||||||
{
|
{
|
||||||
if (!isset($this->channels[$appId][$channelId])) {
|
if (!isset($this->channels[$appId][$channelId])) {
|
||||||
/**TODO: make this variable to go away */
|
$this->channels[$appId][$channelId] = (new ReflectionClass($this->detectChannelClass($channelId)))->newInstance($channelId);
|
||||||
$channelClass = $this->detectChannelClass($channelId);
|
|
||||||
|
|
||||||
$this->channels[$appId][$channelId] = new $channelClass($channelId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->channels[$appId][$channelId];
|
return $this->channels[$appId][$channelId];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue