0 follower

Final Class Yiisoft\Queue\Stubs\StubAdapter

InheritanceYiisoft\Queue\Stubs\StubAdapter
ImplementsYiisoft\Queue\Adapter\AdapterInterface

Stub adapter that does nothing. Job status is always "done".

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( string|\BackedEnum $channel QueueInterface::DEFAULT_CHANNEL )
$channel string|\BackedEnum

                public function __construct(
    string|BackedEnum $channel = QueueInterface::DEFAULT_CHANNEL
) {
    $this->channel = ChannelNormalizer::normalize($channel);
}

            
getChannel() public method

public string getChannel ( )

                public function getChannel(): string
{
    return $this->channel;
}

            
push() public method

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

                public function push(MessageInterface $message): MessageInterface
{
    return $message;
}

            
runExisting() public method

public void runExisting ( callable $handlerCallback )
$handlerCallback callable

                public function runExisting(callable $handlerCallback): void
{
}

            
status() public method

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

                public function status(int|string $id): JobStatus
{
    return JobStatus::DONE;
}

            
subscribe() public method

public void subscribe ( callable $handlerCallback )
$handlerCallback callable

                public function subscribe(callable $handlerCallback): void
{
}

            
withChannel() public method

public Yiisoft\Queue\Adapter\AdapterInterface withChannel ( string|\BackedEnum $channel )
$channel string|\BackedEnum

                public function withChannel(string|BackedEnum $channel): AdapterInterface
{
    $new = clone $this;
    $new->channel = ChannelNormalizer::normalize($channel);
    return $new;
}