Skip to content

Instantly share code, notes, and snippets.

@duartedouglas
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duartedouglas/3f4cd81d318d48ae35bb to your computer and use it in GitHub Desktop.
Save duartedouglas/3f4cd81d318d48ae35bb to your computer and use it in GitHub Desktop.
Crud Interface
<?php
namespace Whatever\Dao;
use Whatever\Model\EntityInterface;
/**
* Interface DataAccess
* @package Whatever\Dao
*/
interface DataAccess
{
/**
* @param EntityInterface $e
* @return mixed
*/
public function insert(EntityInterface $e);
/**
* @param EntityInterface $e
* @return mixed
*/
public function update(EntityInterface $e);
/**
* @return mixed
*/
public function findAll();
/**
* @param $id
* @return mixed
*/
public function findById($id);
/**
* @param $id
* @return mixed
*/
public function delete($id);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment