Controller.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @package Zend_Rest
  16. * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  17. * @license http://framework.zend.com/license/new-bsd New BSD License
  18. * @version $Id$
  19. */
  20. /** Zend_Controller_Action */
  21. require_once 'Zend/Controller/Action.php';
  22. /**
  23. * An abstract class to guide implementation of action controllers for use with
  24. * Zend_Rest_Route.
  25. *
  26. * @package Zend_Rest
  27. * @see Zend_Rest_Route
  28. * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  29. * @license http://framework.zend.com/license/new-bsd New BSD License
  30. */
  31. abstract class Zend_Rest_Controller extends Zend_Controller_Action
  32. {
  33. /**
  34. * The index action handles index/list requests; it should respond with a
  35. * list of the requested resources.
  36. */
  37. abstract public function indexAction();
  38. /**
  39. * The get action handles GET requests and receives an 'id' parameter; it
  40. * should respond with the server resource state of the resource identified
  41. * by the 'id' value.
  42. */
  43. abstract public function getAction();
  44. /**
  45. * The post action handles POST requests; it should accept and digest a
  46. * POSTed resource representation and persist the resource state.
  47. */
  48. abstract public function postAction();
  49. /**
  50. * The put action handles PUT requests and receives an 'id' parameter; it
  51. * should update the server resource state of the resource identified by
  52. * the 'id' value.
  53. */
  54. abstract public function putAction();
  55. /**
  56. * The delete action handles DELETE requests and receives an 'id'
  57. * parameter; it should update the server resource state of the resource
  58. * identified by the 'id' value.
  59. */
  60. abstract public function deleteAction();
  61. }