Edit File by line
/home/zeestwma/ajeebong.../wp-inclu.../SimplePi.../src/Cache
File: Base.php
<?php
[0] Fix | Delete
[1] Fix | Delete
/**
[2] Fix | Delete
* SimplePie
[3] Fix | Delete
*
[4] Fix | Delete
* A PHP-Based RSS and Atom Feed Framework.
[5] Fix | Delete
* Takes the hard work out of managing a complete RSS/Atom solution.
[6] Fix | Delete
*
[7] Fix | Delete
* Copyright (c) 2004-2022, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
[8] Fix | Delete
* All rights reserved.
[9] Fix | Delete
*
[10] Fix | Delete
* Redistribution and use in source and binary forms, with or without modification, are
[11] Fix | Delete
* permitted provided that the following conditions are met:
[12] Fix | Delete
*
[13] Fix | Delete
* * Redistributions of source code must retain the above copyright notice, this list of
[14] Fix | Delete
* conditions and the following disclaimer.
[15] Fix | Delete
*
[16] Fix | Delete
* * Redistributions in binary form must reproduce the above copyright notice, this list
[17] Fix | Delete
* of conditions and the following disclaimer in the documentation and/or other materials
[18] Fix | Delete
* provided with the distribution.
[19] Fix | Delete
*
[20] Fix | Delete
* * Neither the name of the SimplePie Team nor the names of its contributors may be used
[21] Fix | Delete
* to endorse or promote products derived from this software without specific prior
[22] Fix | Delete
* written permission.
[23] Fix | Delete
*
[24] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
[25] Fix | Delete
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
[26] Fix | Delete
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
[27] Fix | Delete
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
[28] Fix | Delete
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
[29] Fix | Delete
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
[30] Fix | Delete
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
[31] Fix | Delete
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
[32] Fix | Delete
* POSSIBILITY OF SUCH DAMAGE.
[33] Fix | Delete
*
[34] Fix | Delete
* @package SimplePie
[35] Fix | Delete
* @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
[36] Fix | Delete
* @author Ryan Parman
[37] Fix | Delete
* @author Sam Sneddon
[38] Fix | Delete
* @author Ryan McCue
[39] Fix | Delete
* @link http://simplepie.org/ SimplePie
[40] Fix | Delete
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
[41] Fix | Delete
*/
[42] Fix | Delete
[43] Fix | Delete
namespace SimplePie\Cache;
[44] Fix | Delete
[45] Fix | Delete
/**
[46] Fix | Delete
* Base for cache objects
[47] Fix | Delete
*
[48] Fix | Delete
* Classes to be used with {@see \SimplePie\Cache::register()} are expected
[49] Fix | Delete
* to implement this interface.
[50] Fix | Delete
*
[51] Fix | Delete
* @package SimplePie
[52] Fix | Delete
* @subpackage Caching
[53] Fix | Delete
* @deprecated since SimplePie 1.8.0, use "Psr\SimpleCache\CacheInterface" instead
[54] Fix | Delete
*/
[55] Fix | Delete
interface Base
[56] Fix | Delete
{
[57] Fix | Delete
/**
[58] Fix | Delete
* Feed cache type
[59] Fix | Delete
*
[60] Fix | Delete
* @var string
[61] Fix | Delete
*/
[62] Fix | Delete
public const TYPE_FEED = 'spc';
[63] Fix | Delete
[64] Fix | Delete
/**
[65] Fix | Delete
* Image cache type
[66] Fix | Delete
*
[67] Fix | Delete
* @var string
[68] Fix | Delete
*/
[69] Fix | Delete
public const TYPE_IMAGE = 'spi';
[70] Fix | Delete
[71] Fix | Delete
/**
[72] Fix | Delete
* Create a new cache object
[73] Fix | Delete
*
[74] Fix | Delete
* @param string $location Location string (from SimplePie::$cache_location)
[75] Fix | Delete
* @param string $name Unique ID for the cache
[76] Fix | Delete
* @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
[77] Fix | Delete
*/
[78] Fix | Delete
public function __construct($location, $name, $type);
[79] Fix | Delete
[80] Fix | Delete
/**
[81] Fix | Delete
* Save data to the cache
[82] Fix | Delete
*
[83] Fix | Delete
* @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
[84] Fix | Delete
* @return bool Successfulness
[85] Fix | Delete
*/
[86] Fix | Delete
public function save($data);
[87] Fix | Delete
[88] Fix | Delete
/**
[89] Fix | Delete
* Retrieve the data saved to the cache
[90] Fix | Delete
*
[91] Fix | Delete
* @return array Data for SimplePie::$data
[92] Fix | Delete
*/
[93] Fix | Delete
public function load();
[94] Fix | Delete
[95] Fix | Delete
/**
[96] Fix | Delete
* Retrieve the last modified time for the cache
[97] Fix | Delete
*
[98] Fix | Delete
* @return int Timestamp
[99] Fix | Delete
*/
[100] Fix | Delete
public function mtime();
[101] Fix | Delete
[102] Fix | Delete
/**
[103] Fix | Delete
* Set the last modified time to the current time
[104] Fix | Delete
*
[105] Fix | Delete
* @return bool Success status
[106] Fix | Delete
*/
[107] Fix | Delete
public function touch();
[108] Fix | Delete
[109] Fix | Delete
/**
[110] Fix | Delete
* Remove the cache
[111] Fix | Delete
*
[112] Fix | Delete
* @return bool Success status
[113] Fix | Delete
*/
[114] Fix | Delete
public function unlink();
[115] Fix | Delete
}
[116] Fix | Delete
[117] Fix | Delete
class_alias('SimplePie\Cache\Base', 'SimplePie_Cache_Base');
[118] Fix | Delete
[119] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function