vendor/swiftmailer/lib/classes/Swift/KeyCache/NullKeyCache.php
changeset 0 7f95f8617b0b
equal deleted inserted replaced
-1:000000000000 0:7f95f8617b0b
       
     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 /**
       
    13  * A null KeyCache that does not cache at all.
       
    14  * @package Swift
       
    15  * @subpackage KeyCache
       
    16  * @author Chris Corbyn
       
    17  */
       
    18 class Swift_KeyCache_NullKeyCache implements Swift_KeyCache
       
    19 {
       
    20   
       
    21   /**
       
    22    * Set a string into the cache under $itemKey for the namespace $nsKey.
       
    23    * @param string $nsKey
       
    24    * @param string $itemKey
       
    25    * @param string $string
       
    26    * @param int $mode
       
    27    * @see MODE_WRITE, MODE_APPEND
       
    28    */
       
    29   public function setString($nsKey, $itemKey, $string, $mode)
       
    30   {
       
    31   }
       
    32   
       
    33   /**
       
    34    * Set a ByteStream into the cache under $itemKey for the namespace $nsKey.
       
    35    * @param string $nsKey
       
    36    * @param string $itemKey
       
    37    * @param Swift_OutputByteStream $os
       
    38    * @param int $mode
       
    39    * @see MODE_WRITE, MODE_APPEND
       
    40    */
       
    41   public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os,
       
    42     $mode)
       
    43   {
       
    44   }
       
    45   
       
    46   /**
       
    47    * Provides a ByteStream which when written to, writes data to $itemKey.
       
    48    * NOTE: The stream will always write in append mode.
       
    49    * @param string $nsKey
       
    50    * @param string $itemKey
       
    51    * @return Swift_InputByteStream
       
    52    */
       
    53   public function getInputByteStream($nsKey, $itemKey,
       
    54     Swift_InputByteStream $writeThrough = null)
       
    55   {
       
    56   }
       
    57   
       
    58   /**
       
    59    * Get data back out of the cache as a string.
       
    60    * @param string $nsKey
       
    61    * @param string $itemKey
       
    62    * @return string
       
    63    */
       
    64   public function getString($nsKey, $itemKey)
       
    65   {
       
    66   }
       
    67   
       
    68   /**
       
    69    * Get data back out of the cache as a ByteStream.
       
    70    * @param string $nsKey
       
    71    * @param string $itemKey
       
    72    * @param Swift_InputByteStream $is to write the data to
       
    73    */
       
    74   public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is)
       
    75   {
       
    76   }
       
    77   
       
    78   /**
       
    79    * Check if the given $itemKey exists in the namespace $nsKey.
       
    80    * @param string $nsKey
       
    81    * @param string $itemKey
       
    82    * @return boolean
       
    83    */
       
    84   public function hasKey($nsKey, $itemKey)
       
    85   {
       
    86     return false;
       
    87   }
       
    88   
       
    89   /**
       
    90    * Clear data for $itemKey in the namespace $nsKey if it exists.
       
    91    * @param string $nsKey
       
    92    * @param string $itemKey
       
    93    */
       
    94   public function clearKey($nsKey, $itemKey)
       
    95   {
       
    96   }
       
    97   
       
    98   /**
       
    99    * Clear all data in the namespace $nsKey if it exists.
       
   100    * @param string $nsKey
       
   101    */
       
   102   public function clearAll($nsKey)
       
   103   {
       
   104   }
       
   105   
       
   106 }