mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-06 15:06:31 +02:00
Applied fixes from StyleCI
This commit is contained in:
committed by
StyleCI Bot
parent
3663603b80
commit
fe1f144ec3
@@ -3,38 +3,39 @@
|
||||
namespace DesignPatterns\More\Repository;
|
||||
|
||||
/**
|
||||
* Interface Storage
|
||||
* Interface Storage.
|
||||
*
|
||||
* This interface describes methods for accessing storage.
|
||||
* Concrete realization could be whatever we want - in memory, relational database, NoSQL database and etc
|
||||
*
|
||||
* @package DesignPatterns\Repository
|
||||
*/
|
||||
interface Storage
|
||||
{
|
||||
/**
|
||||
* Method to persist data
|
||||
* Returns new id for just persisted data
|
||||
* Returns new id for just persisted data.
|
||||
*
|
||||
* @param array() $data
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function persist($data);
|
||||
|
||||
/**
|
||||
* Returns data by specified id.
|
||||
* If there is no such data null is returned
|
||||
* If there is no such data null is returned.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return array|null
|
||||
*/
|
||||
public function retrieve($id);
|
||||
|
||||
/**
|
||||
* Delete data specified by id
|
||||
* If there is no such data - false returns, if data has been successfully deleted - true returns
|
||||
* If there is no such data - false returns, if data has been successfully deleted - true returns.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function delete($id);
|
||||
|
Reference in New Issue
Block a user