diff --git a/Entity/Builder.php b/Entity/Builder.php index 0c66b75..680157b 100644 --- a/Entity/Builder.php +++ b/Entity/Builder.php @@ -28,7 +28,7 @@ public function create( array $relationships = [] ) { - return isset($builders[$resourceType]) + return isset($this->builders[$resourceType]) ? $this->builders[$resourceType]->create($fields, $relationships) : $this->builders['default']->create($fields, $relationships); } diff --git a/Entity/Deleter.php b/Entity/Deleter.php index e690264..0d353c6 100644 --- a/Entity/Deleter.php +++ b/Entity/Deleter.php @@ -25,7 +25,7 @@ class Deleter */ public function delete($resourceType, ResourceEntityInterface $entity) { - return isset($deleters[$resourceType]) + return isset($this->deleters[$resourceType]) ? $this->deleters[$resourceType]->delete($entity) : $this->deleters['default']->delete($entity); } diff --git a/Entity/Mutator.php b/Entity/Mutator.php index 73fd073..7f6aef3 100644 --- a/Entity/Mutator.php +++ b/Entity/Mutator.php @@ -33,7 +33,7 @@ public function update( array $relationships = [] ) { - return isset($mutators[$resourceType]) + return isset($this->mutators[$resourceType]) ? $this->mutators[$resourceType] ->update($entity, $fields, $relationships) : $this->mutators['default']