Skip to content

Instantly share code, notes, and snippets.

@JuanLuisGarciaBorrego
Created July 5, 2015 15:48
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 JuanLuisGarciaBorrego/07e6c9e75e2c82c37820 to your computer and use it in GitHub Desktop.
Save JuanLuisGarciaBorrego/07e6c9e75e2c82c37820 to your computer and use it in GitHub Desktop.
UserRepositoryISP-Infrige
class UserRepository implements RepositoryInterface
{
public function insert($data)
{
//acción insert en BD
}
public function update($data)
{
//acción update en BD
}
public function delete($data){
//Devolvemos una Excepción por que no queremos que se puedan eliminar Users
throw new Exception('No puedes borrar User');
}
public function findAll($data)
{
//Muestra toda las filas de la tabla en BD
}
public function findById($data)
{
//Busca la fila que tenga el id x
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment