0 follower

Interface Yiisoft\Queue\Adapter\AdapterInterface

Implemented byYiisoft\Queue\Adapter\SynchronousAdapter, Yiisoft\Queue\Stubs\StubAdapter

Public Methods

Hide inherited methods

Method Description Defined By
getChannel() Yiisoft\Queue\Adapter\AdapterInterface
push() Pushing a message to the queue. Adapter sets message ID if available. Yiisoft\Queue\Adapter\AdapterInterface
runExisting() Returns the first message from the queue if it exists (null otherwise). Yiisoft\Queue\Adapter\AdapterInterface
status() Returns status code of a message with the given id. Yiisoft\Queue\Adapter\AdapterInterface
subscribe() Listen to the queue and pass messages to the given handler as they come. Yiisoft\Queue\Adapter\AdapterInterface
withChannel() Yiisoft\Queue\Adapter\AdapterInterface

Method Details

Hide inherited methods

getChannel() public abstract method

public abstract string getChannel ( )

                public function getChannel(): string;

            
push() public abstract method

Pushing a message to the queue. Adapter sets message ID if available.

public abstract Yiisoft\Queue\Message\MessageInterface push ( Yiisoft\Queue\Message\MessageInterface $message )
$message Yiisoft\Queue\Message\MessageInterface

                public function push(MessageInterface $message): MessageInterface;

            
runExisting() public abstract method

Returns the first message from the queue if it exists (null otherwise).

public abstract void runExisting ( callable $handlerCallback )
$handlerCallback callable

The handler which will handle messages. Returns false if it cannot continue handling messages

                public function runExisting(callable $handlerCallback): void;

            
status() public abstract method

Returns status code of a message with the given id.

public abstract \Yiisoft\Queue\JobStatus status ( integer|string $id )
$id integer|string

ID of a job message.

throws InvalidArgumentException

When there is no such id in the adapter.

                public function status(string|int $id): JobStatus;

            
subscribe() public abstract method

Listen to the queue and pass messages to the given handler as they come.

public abstract void subscribe ( callable $handlerCallback )
$handlerCallback callable

The handler which will handle messages. Returns false if it cannot continue handling messages.

                public function subscribe(callable $handlerCallback): void;

            
withChannel() public abstract method

public abstract self withChannel ( string|\BackedEnum $channel )
$channel string|\BackedEnum

                public function withChannel(string|BackedEnum $channel): self;