This commit is contained in:
Marcel Pociot
2020-04-24 12:37:31 +02:00
parent 018d778e5f
commit 9ce19f975e
28 changed files with 1160 additions and 91 deletions

View File

@@ -27,6 +27,9 @@ class Factory
/** @var string */
protected $auth = '';
/** @var string */
protected $authToken = '';
/** @var \React\EventLoop\LoopInterface */
protected $loop;
@@ -52,13 +55,20 @@ class Factory
return $this;
}
public function setAuth(string $auth)
public function setAuth(?string $auth)
{
$this->auth = $auth;
return $this;
}
public function setAuthToken(?string $authToken)
{
$this->authToken = $authToken;
return $this;
}
public function setLoop(LoopInterface $loop)
{
$this->loop = $loop;
@@ -69,7 +79,7 @@ class Factory
protected function bindConfiguration()
{
app()->singleton(Configuration::class, function ($app) {
return new Configuration($this->host, $this->port, $this->auth);
return new Configuration($this->host, $this->port, $this->auth, $this->authToken);
});
}