/framework/vendor/zend/Zend/Rest/Controller.php

http://zoop.googlecode.com/ · PHP · 70 lines · 10 code · 7 blank · 53 comment · 0 complexity · 143b41db4793d2f4260660a1f8ed3499 MD5 · raw file

  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-2010 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @license http://framework.zend.com/license/new-bsd New BSD License
  19. * @version $Id: Controller.php 20096 2010-01-06 02:05:09Z bkarwin $
  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-2010 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 post action handles POST requests; it should accept and digest a
  48. * POSTed resource representation and persist the resource state.
  49. */
  50. abstract public function postAction();
  51. /**
  52. * The put action handles PUT requests and receives an 'id' parameter; it
  53. * should update the server resource state of the resource identified by
  54. * the 'id' value.
  55. */
  56. abstract public function putAction();
  57. /**
  58. * The delete action handles DELETE requests and receives an 'id'
  59. * parameter; it should update the server resource state of the resource
  60. * identified by the 'id' value.
  61. */
  62. abstract public function deleteAction();
  63. }