Constants.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. /**
  3. * This file is part of amfPHP
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the license that is bundled
  8. * with this package in the file license.txt.
  9. */
  10. /**
  11. * constants relative to the Amf format
  12. *
  13. * @package Amfphp_Core_Amf
  14. * @author Ariel Sommeria-klein
  15. */
  16. class Amfphp_Core_Amf_Constants {
  17. /**
  18. * The success method name
  19. */
  20. const CLIENT_SUCCESS_METHOD = '/onResult';
  21. /**
  22. * The status method name
  23. */
  24. const CLIENT_FAILURE_METHOD = '/onStatus';
  25. /**
  26. * used when there is an error and the request response uri is not available
  27. */
  28. const DEFAULT_REQUEST_RESPONSE_URI = '/1';
  29. /**
  30. * The AMf content type, for use in the headers
  31. */
  32. const CONTENT_TYPE = 'application/x-amf';
  33. /**
  34. * this is the field where the class name of an object must be set so that it can be sent as a strongly typed object.
  35. *
  36. * try to use this where possible, but it can't be everywhere because we would need to use ReflectionClass::hasProperty, and that is only with PHP 5.1
  37. */
  38. const FIELD_EXPLICIT_TYPE = '_explicitType';
  39. /**
  40. * if an object is marked as externalizable(AMF3 and later), this is where the externalized data goes.
  41. */
  42. const FIELD_EXTERNALIZED_DATA = '_externalizedData';
  43. /**
  44. * this is the name of the credentials header. can be used for AS3, but is mostly AS2 only
  45. */
  46. const CREDENTIALS_HEADER_NAME = 'Credentials';
  47. /**
  48. * the user id field in the credentials header
  49. */
  50. const CREDENTIALS_FIELD_USERID = 'userid';
  51. /**
  52. * the password field in the credentials header
  53. */
  54. const CREDENTIALS_FIELD_PASSWORD = 'password';
  55. /**
  56. * amf0 encoding
  57. */
  58. const AMF0_ENCODING = 0;
  59. /**
  60. * amf3 encoding
  61. */
  62. const AMF3_ENCODING = 3;
  63. }
  64. ?>