Skip to content

Commit

Permalink
added DriverException for representing errors in the data layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Jared King committed Dec 29, 2015
1 parent d2fcb47 commit f103fb1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Driver/DriverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ interface DriverInterface
* @param array $parameters
*
* @return mixed result
*
* @throws \Pulsar\Exception\DriverException when an exception occurs within the driver
*/
public function createModel(Model $model, array $parameters);

Expand All @@ -33,6 +35,8 @@ public function createModel(Model $model, array $parameters);
* @param string $propertyName
*
* @return mixed
*
* @throws \Pulsar\Exception\DriverException when an exception occurs within the driver
*/
public function getCreatedID(Model $model, $propertyName);

Expand All @@ -42,6 +46,8 @@ public function getCreatedID(Model $model, $propertyName);
* @param \Pulsar\Model $model
*
* @return array|false
*
* @throws \Pulsar\Exception\DriverException when an exception occurs within the driver
*/
public function loadModel(Model $model);

Expand All @@ -52,6 +58,8 @@ public function loadModel(Model $model);
* @param array $parameters
*
* @return bool
*
* @throws \Pulsar\Exception\DriverException when an exception occurs within the driver
*/
public function updateModel(Model $model, array $parameters);

Expand All @@ -61,6 +69,8 @@ public function updateModel(Model $model, array $parameters);
* @param \Pulsar\Model $model
*
* @return bool
*
* @throws \Pulsar\Exception\DriverException when an exception occurs within the driver
*/
public function deleteModel(Model $model);

Expand All @@ -70,6 +80,8 @@ public function deleteModel(Model $model);
* @param \Pulsar\Query $query
*
* @return int total
*
* @throws \Pulsar\Exception\DriverException when an exception occurs within the driver
*/
public function totalRecords(Query $query);

Expand All @@ -79,6 +91,8 @@ public function totalRecords(Query $query);
* @param \Pulsar\Query $query
*
* @return array raw data from storage
*
* @throws \Pulsar\Exception\DriverException when an exception occurs within the driver
*/
public function queryModels(Query $query);
}

0 comments on commit f103fb1

Please sign in to comment.