ApiMethodInfo.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace Luracast\Restler\Data;
  3. /**
  4. * ValueObject for api method info. All needed information about a api method
  5. * is stored here
  6. *
  7. * @category Framework
  8. * @package Restler
  9. * @author R.Arul Kumaran <arul@luracast.com>
  10. * @copyright 2010 Luracast
  11. * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
  12. * @link http://luracast.com/products/restler/
  13. *
  14. */
  15. class ApiMethodInfo extends ValueObject
  16. {
  17. /**
  18. * @var string target url
  19. */
  20. public $url;
  21. /**
  22. * @var string
  23. */
  24. public $className;
  25. /**
  26. * @var string
  27. */
  28. public $methodName;
  29. /**
  30. * @var array parameters to be passed to the api method
  31. */
  32. public $parameters = array();
  33. /**
  34. * @var array information on parameters in the form of array(name => index)
  35. */
  36. public $arguments = array();
  37. /**
  38. * @var array default values for parameters if any
  39. * in the form of array(index => value)
  40. */
  41. public $defaults = array();
  42. /**
  43. * @var array key => value pair of method meta information
  44. */
  45. public $metadata = array();
  46. /**
  47. * @var int access level
  48. * 0 - @public - available for all
  49. * 1 - @hybrid - both public and protected (enhanced info for authorized)
  50. * 2 - @protected comment - only for authenticated users
  51. * 3 - protected method - only for authenticated users
  52. */
  53. public $accessLevel = 0;
  54. }