-
-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathAdapterNotConfiguredException.php
More file actions
38 lines (30 loc) · 1.14 KB
/
AdapterNotConfiguredException.php
File metadata and controls
38 lines (30 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
declare(strict_types=1);
namespace Yiisoft\Queue\Exception\AdapterConfiguration;
use RuntimeException;
use Yiisoft\FriendlyException\FriendlyExceptionInterface;
use Yiisoft\Queue\Provider\QueueProviderInterface;
use Yiisoft\Queue\Queue;
final class AdapterNotConfiguredException extends RuntimeException implements FriendlyExceptionInterface
{
protected $message = 'Queue adapter is not configured';
public function getName(): string
{
return 'Adapter is not configured';
}
public function getSolution(): ?string
{
$queueClass = Queue::class;
$queueProviderInterface = QueueProviderInterface::class;
return <<<SOLUTION
Adapter property must be set in the Queue object before you can use it.
Please use either a constructor "\$adapter" parameter, or "withAdapter()" queue method
to set an appropriate adapter.
A more convenient way to get a configured Queue is a QueueFactory usage.
References:
- $queueClass::\$adapter
- $queueClass::withAdapter()
- $queueProviderInterface
SOLUTION;
}
}