From dae36c2aa4afebb38cc3235b46c6490b2f771aa1 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 11 Nov 2008 06:18:45 +0000 Subject: Create REST_Controller abstract base class for all REST based resource controllers. Any controller that wants to act RESTful can extend this class and implement get/post/put/delete. Tweak default routes to disallow direct access to the REST controller and direct access to any REST methods. --- core/controllers/photo.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/controllers/photo.php') diff --git a/core/controllers/photo.php b/core/controllers/photo.php index 55ab6247..12d86cc4 100644 --- a/core/controllers/photo.php +++ b/core/controllers/photo.php @@ -18,10 +18,11 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class Photo_Controller extends Item_Controller { + public function get($item) { $template = new View("page.html"); - /** @todo: this needs to be data-driven */ + // @todo: this needs to be data-driven $theme = new Theme("default", $template); $template->set_global('item', $item); -- cgit v1.2.3