Interface.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. * @package Zend_Memory
  16. * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  17. * @license http://framework.zend.com/license/new-bsd New BSD License
  18. */
  19. /**
  20. * Memory value container interface
  21. *
  22. * @category Zend
  23. * @package Zend_Memory
  24. * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  25. * @license http://framework.zend.com/license/new-bsd New BSD License
  26. */
  27. interface Zend_Memory_Container_Interface
  28. {
  29. /**
  30. * Get string value reference
  31. *
  32. * _Must_ be used for value access before PHP v 5.2
  33. * or _may_ be used for performance considerations
  34. *
  35. * @return &string
  36. */
  37. public function &getRef();
  38. /**
  39. * Signal, that value is updated by external code.
  40. *
  41. * Should be used together with getRef()
  42. */
  43. public function touch();
  44. /**
  45. * Lock object in memory.
  46. */
  47. public function lock();
  48. /**
  49. * Unlock object
  50. */
  51. public function unlock();
  52. /**
  53. * Return true if object is locked
  54. *
  55. * @return boolean
  56. */
  57. public function isLocked();
  58. }