From ec3972361d95f6f5956df77f7a76105b5ae6af72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sun, 25 Aug 2013 20:10:23 +0200 Subject: poche now uses Full Text RSS to fetch content --- inc/3rdparty/simplepie/SimplePie/Cache.php | 109 +++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 inc/3rdparty/simplepie/SimplePie/Cache.php (limited to 'inc/3rdparty/simplepie/SimplePie/Cache.php') diff --git a/inc/3rdparty/simplepie/SimplePie/Cache.php b/inc/3rdparty/simplepie/SimplePie/Cache.php new file mode 100644 index 00000000..819ddeea --- /dev/null +++ b/inc/3rdparty/simplepie/SimplePie/Cache.php @@ -0,0 +1,109 @@ + 'SimplePie_Cache_MySQL', + 'memcache' => 'SimplePie_Cache_Memcache', + ); + + /** + * Don't call the constructor. Please. + */ + private function __construct() { } + + /** + * Create a new SimplePie_Cache object + */ + public static function create($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); + } + + /** + * 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; + } +} -- cgit v1.2.3