Interface.php 1.6 KB

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