Added PublishEvent listener connection and queue configuration feature
This commit is contained in:
@@ -4,23 +4,38 @@ declare(strict_types=1);
|
||||
|
||||
namespace Diffhead\PHP\LaravelRabbitMQ\Object;
|
||||
|
||||
use PhpAmqpLib\Channel\AMQPChannel;
|
||||
use PhpAmqpLib\Connection\AMQPStreamConnection;
|
||||
|
||||
class Connection
|
||||
{
|
||||
public function __construct(
|
||||
private AMQPStreamConnection $connection,
|
||||
private AMQPChannel $channel
|
||||
private string $host,
|
||||
private int $port,
|
||||
private string $user,
|
||||
private string $password,
|
||||
private string $vhost,
|
||||
) {}
|
||||
|
||||
public function connection(): AMQPStreamConnection
|
||||
public function host(): string
|
||||
{
|
||||
return $this->connection;
|
||||
return $this->host;
|
||||
}
|
||||
|
||||
public function channel(): AMQPChannel
|
||||
public function port(): int
|
||||
{
|
||||
return $this->channel;
|
||||
return $this->port;
|
||||
}
|
||||
|
||||
public function user(): string
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
public function password(): string
|
||||
{
|
||||
return $this->password;
|
||||
}
|
||||
|
||||
public function vhost(): string
|
||||
{
|
||||
return $this->vhost;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user