1: | <?php declare(strict_types=1); |
2: | |
3: | namespace Salient\Sync\Exception; |
4: | |
5: | use Salient\Contract\Sync\Exception\SyncOperationNotImplementedExceptionInterface; |
6: | use Salient\Contract\Sync\SyncEntityInterface; |
7: | use Salient\Contract\Sync\SyncOperation; |
8: | use Salient\Contract\Sync\SyncProviderInterface; |
9: | use Salient\Utility\Reflect; |
10: | |
11: | |
12: | |
13: | |
14: | class SyncOperationNotImplementedException extends AbstractSyncException implements SyncOperationNotImplementedExceptionInterface |
15: | { |
16: | |
17: | |
18: | |
19: | |
20: | public function __construct(SyncProviderInterface $provider, string $entity, int $operation) |
21: | { |
22: | parent::__construct(sprintf( |
23: | '%s has not implemented SyncOperation::%s for %s', |
24: | $this->getProviderName($provider), |
25: | Reflect::getConstantName(SyncOperation::class, $operation), |
26: | $entity, |
27: | )); |
28: | } |
29: | } |
30: | |