IVoConverter.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. * interface for Vo Converters.
  12. * @package Amfphp_Core_Common
  13. * @author Ariel Sommeria-klein
  14. */
  15. interface Amfphp_Core_Common_IVoConverter {
  16. /**
  17. * creates and returns an instance of of $voName.
  18. *
  19. * @param type $voName
  20. * @return typed object or null
  21. */
  22. public function getNewVoInstance($voName);
  23. /**
  24. * sets the the explicit type marker on the object.
  25. *
  26. *
  27. * @param mixed $obj
  28. * @return mixed
  29. */
  30. public function markExplicitType($obj);
  31. /**
  32. * for some protocols it is possible to call convertToType and markExplicitObject directly during deserialization and serialization.
  33. * This is typically the case of AMF, but not JSON.
  34. * In that case this function must be called with enabled set to false, so the plugin does not scan the objects to do it itself.
  35. * By default scanning is enabled
  36. * @param boolean $enabled
  37. */
  38. public function setScanEnabled($enabled);
  39. /**
  40. * get scan enabled.
  41. * @return boolean
  42. */
  43. public function getScanEnabled();
  44. }
  45. ?>