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