Interface.php 1.6 KB

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