Final Class Yiisoft\Queue\Message\Handler\CallableHandler
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Yiisoft\ |
Handles a message by invoking the given callable.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
|
| handle() | Yiisoft\ |
Method Details
| public mixed __construct ( callable $handler ) | ||
| $handler | callable |
Callable invoked to handle a message. |
public function __construct(
private readonly mixed $handler,
) {}
| public void handle ( Yiisoft\ | ||
| $message | Yiisoft\ |
|
public function handle(MessageInterface $message): void
{
($this->handler)($message);
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.