NullKeyCache.php 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?php
  2. /*
  3. * This file is part of SwiftMailer.
  4. * (c) 2004-2009 Chris Corbyn
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. /**
  10. * A null KeyCache that does not cache at all.
  11. * @package Swift
  12. * @subpackage KeyCache
  13. * @author Chris Corbyn
  14. */
  15. class Swift_KeyCache_NullKeyCache implements Swift_KeyCache
  16. {
  17. /**
  18. * Set a string into the cache under $itemKey for the namespace $nsKey.
  19. * @param string $nsKey
  20. * @param string $itemKey
  21. * @param string $string
  22. * @param int $mode
  23. * @see MODE_WRITE, MODE_APPEND
  24. */
  25. public function setString($nsKey, $itemKey, $string, $mode)
  26. {
  27. }
  28. /**
  29. * Set a ByteStream into the cache under $itemKey for the namespace $nsKey.
  30. * @param string $nsKey
  31. * @param string $itemKey
  32. * @param Swift_OutputByteStream $os
  33. * @param int $mode
  34. * @see MODE_WRITE, MODE_APPEND
  35. */
  36. public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, $mode)
  37. {
  38. }
  39. /**
  40. * Provides a ByteStream which when written to, writes data to $itemKey.
  41. * NOTE: The stream will always write in append mode.
  42. * @param string $nsKey
  43. * @param string $itemKey
  44. * @return Swift_InputByteStream
  45. */
  46. public function getInputByteStream($nsKey, $itemKey, Swift_InputByteStream $writeThrough = null)
  47. {
  48. }
  49. /**
  50. * Get data back out of the cache as a string.
  51. * @param string $nsKey
  52. * @param string $itemKey
  53. * @return string
  54. */
  55. public function getString($nsKey, $itemKey)
  56. {
  57. }
  58. /**
  59. * Get data back out of the cache as a ByteStream.
  60. * @param string $nsKey
  61. * @param string $itemKey
  62. * @param Swift_InputByteStream $is to write the data to
  63. */
  64. public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is)
  65. {
  66. }
  67. /**
  68. * Check if the given $itemKey exists in the namespace $nsKey.
  69. * @param string $nsKey
  70. * @param string $itemKey
  71. * @return boolean
  72. */
  73. public function hasKey($nsKey, $itemKey)
  74. {
  75. return false;
  76. }
  77. /**
  78. * Clear data for $itemKey in the namespace $nsKey if it exists.
  79. * @param string $nsKey
  80. * @param string $itemKey
  81. */
  82. public function clearKey($nsKey, $itemKey)
  83. {
  84. }
  85. /**
  86. * Clear all data in the namespace $nsKey if it exists.
  87. * @param string $nsKey
  88. */
  89. public function clearAll($nsKey)
  90. {
  91. }
  92. }