Skip to content

Commit

Permalink
Merge pull request GoIntegro#29 from cyppan/bugfix/api-28-register-cu…
Browse files Browse the repository at this point in the history
…stom-resource-type-deleter

Fixed common problem with Builder, Deleter and Mutator classes
  • Loading branch information
skqr committed Nov 23, 2014
2 parents 36dd899 + ae40f1c commit e25888d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Entity/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion Entity/Deleter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion Entity/Mutator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit e25888d

Please sign in to comment.