TYPO3 API  SVNRelease
NullKeyCache.php
Go to the documentation of this file.
00001 <?php
00002 
00003 /*
00004  * This file is part of SwiftMailer.
00005  * (c) 2004-2009 Chris Corbyn
00006  *
00007  * For the full copyright and license information, please view the LICENSE
00008  * file that was distributed with this source code.
00009  */
00010 
00011 //@require 'Swift/KeyCache.php';
00012 //@require 'Swift/KeyCacheInputStream.php';
00013 //@require 'Swift/InputByteStream.php';
00014 //@require 'Swift/OutputByteStrean.php';
00015 
00016 /**
00017  * A null KeyCache that does not cache at all.
00018  * @package Swift
00019  * @subpackage KeyCache
00020  * @author Chris Corbyn
00021  */
00022 class Swift_KeyCache_NullKeyCache implements Swift_KeyCache
00023 {
00024 
00025   /**
00026    * Set a string into the cache under $itemKey for the namespace $nsKey.
00027    * @param string $nsKey
00028    * @param string $itemKey
00029    * @param string $string
00030    * @param int $mode
00031    * @see MODE_WRITE, MODE_APPEND
00032    */
00033   public function setString($nsKey, $itemKey, $string, $mode)
00034   {
00035   }
00036 
00037   /**
00038    * Set a ByteStream into the cache under $itemKey for the namespace $nsKey.
00039    * @param string $nsKey
00040    * @param string $itemKey
00041    * @param Swift_OutputByteStream $os
00042    * @param int $mode
00043    * @see MODE_WRITE, MODE_APPEND
00044    */
00045   public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os,
00046     $mode)
00047   {
00048   }
00049 
00050   /**
00051    * Provides a ByteStream which when written to, writes data to $itemKey.
00052    * NOTE: The stream will always write in append mode.
00053    * @param string $nsKey
00054    * @param string $itemKey
00055    * @return Swift_InputByteStream
00056    */
00057   public function getInputByteStream($nsKey, $itemKey,
00058     Swift_InputByteStream $writeThrough = null)
00059   {
00060   }
00061 
00062   /**
00063    * Get data back out of the cache as a string.
00064    * @param string $nsKey
00065    * @param string $itemKey
00066    * @return string
00067    */
00068   public function getString($nsKey, $itemKey)
00069   {
00070   }
00071 
00072   /**
00073    * Get data back out of the cache as a ByteStream.
00074    * @param string $nsKey
00075    * @param string $itemKey
00076    * @param Swift_InputByteStream $is to write the data to
00077    */
00078   public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is)
00079   {
00080   }
00081 
00082   /**
00083    * Check if the given $itemKey exists in the namespace $nsKey.
00084    * @param string $nsKey
00085    * @param string $itemKey
00086    * @return boolean
00087    */
00088   public function hasKey($nsKey, $itemKey)
00089   {
00090     return false;
00091   }
00092 
00093   /**
00094    * Clear data for $itemKey in the namespace $nsKey if it exists.
00095    * @param string $nsKey
00096    * @param string $itemKey
00097    */
00098   public function clearKey($nsKey, $itemKey)
00099   {
00100   }
00101 
00102   /**
00103    * Clear all data in the namespace $nsKey if it exists.
00104    * @param string $nsKey
00105    */
00106   public function clearAll($nsKey)
00107   {
00108   }
00109 
00110 }