Controller.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. * @category Zend
  16. * @package Zend_Rest
  17. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @license http://framework.zend.com/license/new-bsd New BSD License
  19. * @version $Id$
  20. */
  21. /** Zend_Controller_Action */
  22. require_once 'Zend/Controller/Action.php';
  23. /**
  24. * An abstract class to guide implementation of action controllers for use with
  25. * Zend_Rest_Route.
  26. *
  27. * @category Zend
  28. * @package Zend_Rest
  29. * @see Zend_Rest_Route
  30. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  31. * @license http://framework.zend.com/license/new-bsd New BSD License
  32. */
  33. abstract class Zend_Rest_Controller extends Zend_Controller_Action
  34. {
  35. /**
  36. * The index action handles index/list requests; it should respond with a
  37. * list of the requested resources.
  38. */
  39. abstract public function indexAction();
  40. /**
  41. * The get action handles GET requests and receives an 'id' parameter; it
  42. * should respond with the server resource state of the resource identified
  43. * by the 'id' value.
  44. */
  45. abstract public function getAction();
  46. /**
  47. * The head action handles HEAD requests and receives an 'id' parameter; it
  48. * should respond with the server resource state of the resource identified
  49. * by the 'id' value.
  50. */
  51. abstract public function headAction();
  52. /**
  53. * The post action handles POST requests; it should accept and digest a
  54. * POSTed resource representation and persist the resource state.
  55. */
  56. abstract public function postAction();
  57. /**
  58. * The put action handles PUT requests and receives an 'id' parameter; it
  59. * should update the server resource state of the resource identified by
  60. * the 'id' value.
  61. */
  62. abstract public function putAction();
  63. /**
  64. * The delete action handles DELETE requests and receives an 'id'
  65. * parameter; it should update the server resource state of the resource
  66. * identified by the 'id' value.
  67. */
  68. abstract public function deleteAction();
  69. }