diff options
Diffstat (limited to 'businesslayer/businesslayer.php')
-rw-r--r-- | businesslayer/businesslayer.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/businesslayer/businesslayer.php b/businesslayer/businesslayer.php index 4ce6f1625..54b64d6a2 100644 --- a/businesslayer/businesslayer.php +++ b/businesslayer/businesslayer.php @@ -40,12 +40,27 @@ abstract class BusinessLayer { } + /** + * Delete an entity + * @param int $id the id of the entity + * @param string $userId the name of the user for security reasons + * @throws DoesNotExistException if the entity does not exist + * @throws MultipleObjectsReturnedException if more than one entity exists + */ public function delete($id, $userId){ $entity = $this->find($id, $userId); $this->mapper->delete($entity); } + /** + * Finds an entity by id + * @param int $id the id of the entity + * @param string $userId the name of the user for security reasons + * @throws DoesNotExistException if the entity does not exist + * @throws MultipleObjectsReturnedException if more than one entity exists + * @return Entity the entity + */ public function find($id, $userId){ try { return $this->mapper->find($id, $userId); @@ -56,4 +71,4 @@ abstract class BusinessLayer { } } -}
\ No newline at end of file +} |