31 private $operationPool;
36 private $callbackHandler;
50 $this->operationPool = $operationPool;
51 $this->metadataPool = $metadataPool;
52 $this->typeResolver = $typeResolver;
53 $this->callbackHandler = $callbackHandler;
66 $operation = $this->operationPool->getOperation(
$entityType,
'read');
68 throw new \LogicException(get_class($operation) .
' must implement ' . ReadInterface::class);
85 $operation = $this->operationPool->getOperation(
$entityType,
'update');
87 throw new \LogicException(get_class($operation) .
' must implement ' . UpdateInterface::class);
90 $operation = $this->operationPool->getOperation(
$entityType,
'create');
92 throw new \LogicException(get_class($operation) .
' must implement ' . CreateInterface::class);
98 }
catch (\Exception $e) {
113 $operation = $this->operationPool->getOperation(
$entityType,
'checkIfExists');
115 throw new \LogicException(get_class($operation) .
' must implement ' . CheckIfExistsInterface::class);
117 return $operation->execute(
$entity);
130 $operation = $this->operationPool->getOperation(
$entityType,
'delete');
132 throw new \LogicException(get_class($operation) .
' must implement ' . DeleteInterface::class);
137 }
catch (\Exception $e) {
save($entity, $arguments=[])
__construct(OperationPool $operationPool, MetadataPool $metadataPool, TypeResolver $typeResolver, CallbackHandler $callbackHandler)
load($entity, $identifier, $arguments=[])