[ Index ] |
MailPress 7.2 |
[ Index ] [ Classes ] [ Functions ] [ Variables ] [ Constants ] [ Statistics ] |
[Summary view] [Print] [Text view]
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 * Provides a mechanism for storing data using two keys. 13 * 14 * @author Chris Corbyn 15 */ 16 interface Swift_KeyCache 17 { 18 /** Mode for replacing existing cached data */ 19 const MODE_WRITE = 1; 20 21 /** Mode for appending data to the end of existing cached data */ 22 const MODE_APPEND = 2; 23 24 /** 25 * Set a string into the cache under $itemKey for the namespace $nsKey. 26 * 27 * @see MODE_WRITE, MODE_APPEND 28 * 29 * @param string $nsKey 30 * @param string $itemKey 31 * @param string $string 32 * @param int $mode 33 */ 34 public function setString($nsKey, $itemKey, $string, $mode); 35 36 /** 37 * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. 38 * 39 * @see MODE_WRITE, MODE_APPEND 40 * 41 * @param string $nsKey 42 * @param string $itemKey 43 * @param int $mode 44 */ 45 public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, $mode); 46 47 /** 48 * Provides a ByteStream which when written to, writes data to $itemKey. 49 * 50 * NOTE: The stream will always write in append mode. 51 * If the optional third parameter is passed all writes will go through $is. 52 * 53 * @param string $nsKey 54 * @param string $itemKey 55 * @param Swift_InputByteStream $is optional input stream 56 * 57 * @return Swift_InputByteStream 58 */ 59 public function getInputByteStream($nsKey, $itemKey, Swift_InputByteStream $is = null); 60 61 /** 62 * Get data back out of the cache as a string. 63 * 64 * @param string $nsKey 65 * @param string $itemKey 66 * 67 * @return string 68 */ 69 public function getString($nsKey, $itemKey); 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 stream to write the data to 77 */ 78 public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is); 79 80 /** 81 * Check if the given $itemKey exists in the namespace $nsKey. 82 * 83 * @param string $nsKey 84 * @param string $itemKey 85 * 86 * @return bool 87 */ 88 public function hasKey($nsKey, $itemKey); 89 90 /** 91 * Clear data for $itemKey in the namespace $nsKey if it exists. 92 * 93 * @param string $nsKey 94 * @param string $itemKey 95 */ 96 public function clearKey($nsKey, $itemKey); 97 98 /** 99 * Clear all data in the namespace $nsKey if it exists. 100 * 101 * @param string $nsKey 102 */ 103 public function clearAll($nsKey); 104 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue May 19 15:55:14 2020 | Cross-referenced by PHPXref 0.7.1 |