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 __construct( string|\BackedEnum $channel QueueProviderInterface::DEFAULT_CHANNEL ): mixed
$channel string|\BackedEnum

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

            
getChannel() public method

public getChannel( ): string

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

            
push() public method

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

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

            
runExisting() public method

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

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

            
status() public method

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

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

            
subscribe() public method

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

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

            
withChannel() public method

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

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