Changeset 59141 for trunk/src/wp-includes/SimplePie/src/Cache/Base.php
- Timestamp:
- 09/30/2024 10:48:16 PM (19 months ago)
- Location:
- trunk/src/wp-includes/SimplePie/src
- Files:
-
- 1 added
- 1 edited
- 1 moved
-
. (added)
-
Cache (moved) (moved from trunk/src/wp-includes/SimplePie/Cache)
-
Cache/Base.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/SimplePie/src/Cache/Base.php
r47733 r59141 1 1 <?php 2 2 3 /** 3 4 * SimplePie … … 6 7 * Takes the hard work out of managing a complete RSS/Atom solution. 7 8 * 8 * Copyright (c) 2004-20 16, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors9 * Copyright (c) 2004-2022, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors 9 10 * All rights reserved. 10 11 * … … 42 43 */ 43 44 45 namespace SimplePie\Cache; 46 44 47 /** 45 48 * Base for cache objects 46 49 * 47 * Classes to be used with {@see SimplePie_Cache::register()} are expected50 * Classes to be used with {@see \SimplePie\Cache::register()} are expected 48 51 * to implement this interface. 49 52 * 50 53 * @package SimplePie 51 54 * @subpackage Caching 55 * @deprecated since SimplePie 1.8.0, use "Psr\SimpleCache\CacheInterface" instead 52 56 */ 53 interface SimplePie_Cache_Base57 interface Base 54 58 { 55 /**56 * Feed cache type57 *58 * @var string59 */60 const TYPE_FEED = 'spc';59 /** 60 * Feed cache type 61 * 62 * @var string 63 */ 64 public const TYPE_FEED = 'spc'; 61 65 62 /**63 * Image cache type64 *65 * @var string66 */67 const TYPE_IMAGE = 'spi';66 /** 67 * Image cache type 68 * 69 * @var string 70 */ 71 public const TYPE_IMAGE = 'spi'; 68 72 69 /**70 * Create a new cache object71 *72 * @param string $location Location string (from SimplePie::$cache_location)73 * @param string $name Unique ID for the cache74 * @param string$type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data75 */76 public function __construct($location, $name, $type);73 /** 74 * Create a new cache object 75 * 76 * @param string $location Location string (from SimplePie::$cache_location) 77 * @param string $name Unique ID for the cache 78 * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data 79 */ 80 public function __construct($location, $name, $type); 77 81 78 /**79 * Save data to the cache80 *81 * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property82 * @return bool Successfulness83 */84 public function save($data);82 /** 83 * Save data to the cache 84 * 85 * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property 86 * @return bool Successfulness 87 */ 88 public function save($data); 85 89 86 /**87 * Retrieve the data saved to the cache88 *89 * @return array Data for SimplePie::$data90 */91 public function load();90 /** 91 * Retrieve the data saved to the cache 92 * 93 * @return array Data for SimplePie::$data 94 */ 95 public function load(); 92 96 93 /**94 * Retrieve the last modified time for the cache95 *96 * @return int Timestamp97 */98 public function mtime();97 /** 98 * Retrieve the last modified time for the cache 99 * 100 * @return int Timestamp 101 */ 102 public function mtime(); 99 103 100 /**101 * Set the last modified time to the current time102 *103 * @return bool Success status104 */105 public function touch();104 /** 105 * Set the last modified time to the current time 106 * 107 * @return bool Success status 108 */ 109 public function touch(); 106 110 107 /**108 * Remove the cache109 *110 * @return bool Success status111 */112 public function unlink();111 /** 112 * Remove the cache 113 * 114 * @return bool Success status 115 */ 116 public function unlink(); 113 117 } 118 119 class_alias('SimplePie\Cache\Base', 'SimplePie_Cache_Base');
Note: See TracChangeset
for help on using the changeset viewer.