home/beautybuzzbeyond/public_html/wp-includes/SimplePie/src/Cache.php 0000604 00000011363 14720017673 0022036 0 ustar 00 'SimplePie\Cache\MySQL',
'memcache' => 'SimplePie\Cache\Memcache',
'memcached' => 'SimplePie\Cache\Memcached',
'redis' => 'SimplePie\Cache\Redis'
];
/**
* Don't call the constructor. Please.
*/
private function __construct()
{
}
/**
* Create a new SimplePie\Cache object
*
* @param string $location URL location (scheme is used to determine handler)
* @param string $filename Unique identifier for cache object
* @param Base::TYPE_FEED|Base::TYPE_IMAGE $extension 'spi' or 'spc'
* @return Base Type of object depends on scheme of `$location`
*/
public static function get_handler($location, $filename, $extension)
{
$type = explode(':', $location, 2);
$type = $type[0];
if (!empty(self::$handlers[$type])) {
$class = self::$handlers[$type];
return new $class($location, $filename, $extension);
}
return new \SimplePie\Cache\File($location, $filename, $extension);
}
/**
* Create a new SimplePie\Cache object
*
* @deprecated since SimplePie 1.3.1, use {@see get_handler()} instead
*/
public function create($location, $filename, $extension)
{
trigger_error('Cache::create() has been replaced with Cache::get_handler() since SimplePie 1.3.1, use the registry system instead.', \E_USER_DEPRECATED);
return self::get_handler($location, $filename, $extension);
}
/**
* Register a handler
*
* @param string $type DSN type to register for
* @param class-string $class Name of handler class. Must implement Base
*/
public static function register($type, $class)
{
self::$handlers[$type] = $class;
}
/**
* Parse a URL into an array
*
* @param string $url
* @return array
*/
public static function parse_URL($url)
{
$params = parse_url($url);
$params['extras'] = [];
if (isset($params['query'])) {
parse_str($params['query'], $params['extras']);
}
return $params;
}
}
class_alias('SimplePie\Cache', 'SimplePie_Cache');
home/beautybuzzbeyond/public_html/old/wp-includes/SimplePie/Cache.php 0000644 00000010403 14720025223 0022011 0 ustar 00 'SimplePie_Cache_MySQL',
'memcache' => 'SimplePie_Cache_Memcache',
'memcached' => 'SimplePie_Cache_Memcached',
'redis' => 'SimplePie_Cache_Redis'
);
/**
* Don't call the constructor. Please.
*/
private function __construct() { }
/**
* Create a new SimplePie_Cache object
*
* @param string $location URL location (scheme is used to determine handler)
* @param string $filename Unique identifier for cache object
* @param string $extension 'spi' or 'spc'
* @return SimplePie_Cache_Base Type of object depends on scheme of `$location`
*/
public static function get_handler($location, $filename, $extension)
{
$type = explode(':', $location, 2);
$type = $type[0];
if (!empty(self::$handlers[$type]))
{
$class = self::$handlers[$type];
return new $class($location, $filename, $extension);
}
return new SimplePie_Cache_File($location, $filename, $extension);
}
/**
* Create a new SimplePie_Cache object
*
* @deprecated Use {@see get_handler} instead
*/
public function create($location, $filename, $extension)
{
trigger_error('Cache::create() has been replaced with Cache::get_handler(). Switch to the registry system to use this.', E_USER_DEPRECATED);
return self::get_handler($location, $filename, $extension);
}
/**
* Register a handler
*
* @param string $type DSN type to register for
* @param string $class Name of handler class. Must implement SimplePie_Cache_Base
*/
public static function register($type, $class)
{
self::$handlers[$type] = $class;
}
/**
* Parse a URL into an array
*
* @param string $url
* @return array
*/
public static function parse_URL($url)
{
$params = parse_url($url);
$params['extras'] = array();
if (isset($params['query']))
{
parse_str($params['query'], $params['extras']);
}
return $params;
}
}