Edit File by line
/home/zeestwma/redstone.../wp-inclu.../SimplePi.../src/Cache
File: Base.php
<?php
[0] Fix | Delete
[1] Fix | Delete
// SPDX-FileCopyrightText: 2004-2023 Ryan Parman, Sam Sneddon, Ryan McCue
[2] Fix | Delete
// SPDX-License-Identifier: BSD-3-Clause
[3] Fix | Delete
[4] Fix | Delete
declare(strict_types=1);
[5] Fix | Delete
[6] Fix | Delete
namespace SimplePie\Cache;
[7] Fix | Delete
[8] Fix | Delete
/**
[9] Fix | Delete
* Base for cache objects
[10] Fix | Delete
*
[11] Fix | Delete
* Classes to be used with {@see \SimplePie\Cache::register()} are expected
[12] Fix | Delete
* to implement this interface.
[13] Fix | Delete
*
[14] Fix | Delete
* @deprecated since SimplePie 1.8.0, use "Psr\SimpleCache\CacheInterface" instead
[15] Fix | Delete
*/
[16] Fix | Delete
interface Base
[17] Fix | Delete
{
[18] Fix | Delete
/**
[19] Fix | Delete
* Feed cache type
[20] Fix | Delete
*
[21] Fix | Delete
* @var string
[22] Fix | Delete
*/
[23] Fix | Delete
public const TYPE_FEED = 'spc';
[24] Fix | Delete
[25] Fix | Delete
/**
[26] Fix | Delete
* Image cache type
[27] Fix | Delete
*
[28] Fix | Delete
* @var string
[29] Fix | Delete
*/
[30] Fix | Delete
public const TYPE_IMAGE = 'spi';
[31] Fix | Delete
[32] Fix | Delete
/**
[33] Fix | Delete
* Create a new cache object
[34] Fix | Delete
*
[35] Fix | Delete
* @param string $location Location string (from SimplePie::$cache_location)
[36] Fix | Delete
* @param string $name Unique ID for the cache
[37] Fix | Delete
* @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
[38] Fix | Delete
*/
[39] Fix | Delete
public function __construct(string $location, string $name, $type);
[40] Fix | Delete
[41] Fix | Delete
/**
[42] Fix | Delete
* Save data to the cache
[43] Fix | Delete
*
[44] Fix | Delete
* @param array<mixed>|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
[45] Fix | Delete
* @return bool Successfulness
[46] Fix | Delete
*/
[47] Fix | Delete
public function save($data);
[48] Fix | Delete
[49] Fix | Delete
/**
[50] Fix | Delete
* Retrieve the data saved to the cache
[51] Fix | Delete
*
[52] Fix | Delete
* @return array<mixed> Data for SimplePie::$data
[53] Fix | Delete
*/
[54] Fix | Delete
public function load();
[55] Fix | Delete
[56] Fix | Delete
/**
[57] Fix | Delete
* Retrieve the last modified time for the cache
[58] Fix | Delete
*
[59] Fix | Delete
* @return int Timestamp
[60] Fix | Delete
*/
[61] Fix | Delete
public function mtime();
[62] Fix | Delete
[63] Fix | Delete
/**
[64] Fix | Delete
* Set the last modified time to the current time
[65] Fix | Delete
*
[66] Fix | Delete
* @return bool Success status
[67] Fix | Delete
*/
[68] Fix | Delete
public function touch();
[69] Fix | Delete
[70] Fix | Delete
/**
[71] Fix | Delete
* Remove the cache
[72] Fix | Delete
*
[73] Fix | Delete
* @return bool Success status
[74] Fix | Delete
*/
[75] Fix | Delete
public function unlink();
[76] Fix | Delete
}
[77] Fix | Delete
[78] Fix | Delete
class_alias('SimplePie\Cache\Base', 'SimplePie_Cache_Base');
[79] Fix | Delete
[80] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function