Skip to content

Instantly share code, notes, and snippets.

@lukemorton
Created December 24, 2010 11:44
Show Gist options
  • Save lukemorton/754132 to your computer and use it in GitHub Desktop.
Save lukemorton/754132 to your computer and use it in GitHub Desktop.
Based on the Rails'esque CRUD
<?php defined('SYSPATH') or die('No direct script access.');
/**
* CRUDDDDD
*/
class Controller_Crud extends Controller {
/**
* Show a list of items
*
* @return void
*/
public function action_index()
{
}
/**
* Show one particular item
*
* @return void
*/
public function action_read($id)
{
}
/**
* Form for adding an item
*
* @return void
*/
public function action_add()
{
}
/**
* Create an item
*
* @return void
*/
public function action_create()
{
}
/**
* Form for editing an item
*
* @return void
*/
public function action_edit($id)
{
}
/**
* Update the item
*
* @return void
*/
public function action_update()
{
}
/**
* Delete the item
*
* @return void
*/
public function action_delete($id)
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment