mirror of
https://github.com/danog/postgres.git
synced 2024-12-02 09:27:54 +01:00
29 lines
546 B
PHP
29 lines
546 B
PHP
<?php
|
|
|
|
namespace Amp\Postgres;
|
|
|
|
use Amp\Iterator;
|
|
use Amp\Promise;
|
|
|
|
interface Listener extends Iterator
|
|
{
|
|
/**
|
|
* @return string Channel name.
|
|
*/
|
|
public function getChannel(): string;
|
|
|
|
/**
|
|
* @return bool
|
|
*/
|
|
public function isListening(): bool;
|
|
|
|
/**
|
|
* Unlistens from the channel. No more values will be emitted from this listener.
|
|
*
|
|
* @return Promise<\Amp\Sql\CommandResult>
|
|
*
|
|
* @throws \Error If this method was previously invoked.
|
|
*/
|
|
public function unlisten(): Promise;
|
|
}
|