SimplePie_Cache::get_handler

Advertisement

Summery Summery

Create a new SimplePie_Cache object

Syntax Syntax

SimplePie_Cache::get_handler( string $location, string $filename, string $extension )

Parameters Parameters

$location

(string) (Required) URL location (scheme is used to determine handler)

$filename

(string) (Required) Unique identifier for cache object

$extension

(string) (Required) 'spi' or 'spc'

Return Return

(SimplePie_Cache_Base) Type of object depends on scheme of $location

Source Source

File: wp-includes/SimplePie/Cache.php

	 */
	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);

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.