Created
January 23, 2013 16:25
-
-
Save JesseObrien/4609086 to your computer and use it in GitHub Desktop.
Basic controller for todo list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Todo_Controller extends Base_Controller | |
{ | |
public $restful = true; | |
/** | |
* Show the list of all items | |
*/ | |
public function get_index() | |
{ | |
} | |
/** | |
* Show an individual item | |
*/ | |
public function get_show($todo_id) | |
{ | |
} | |
/** | |
* Show a form to create a new item | |
*/ | |
public function get_create() | |
{ | |
} | |
/** | |
* Create an item and redirect back to the list | |
*/ | |
public function post_create() | |
{ | |
} | |
/** | |
* Mark an item completed | |
*/ | |
public function post_complete($todo_id) | |
{ | |
} | |
/** | |
* Update an item and redirect back to that item | |
*/ | |
public function post_update($todo_id) | |
{ | |
} | |
/** | |
* Delete an item | |
*/ | |
public function post_delete($todo_id) | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment