1
0
mirror of https://github.com/danog/postgres.git synced 2024-12-02 09:27:54 +01:00
postgres/src/Listener.php
2018-07-09 00:10:07 -05:00

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;
}