SimplePie_Registry::call

Advertisement

Summery Summery

Call a static method for a type

Syntax Syntax

SimplePie_Registry::call( string $type, string $method, array $parameters = array() )

Parameters Parameters

$type

(Required)

$method

(Required)

$parameters

(Optional)

Default value: array()

Return Return

(mixed)

Source Source

File: wp-includes/SimplePie/Registry.php

	{
		$class = $this->get_class($type);

		if (in_array($class, $this->legacy))
		{
			switch ($type)
			{
				case 'Cache':
					// For backwards compatibility with old non-static
					// Cache::create() methods
					if ($method === 'get_handler')
					{
						$result = @call_user_func_array(array($class, 'create'), $parameters);
						return $result;
					}
					break;
			}
		}

		$result = call_user_func_array(array($class, $method), $parameters);
		return $result;
	}
}

Advertisement

Advertisement

Leave a Reply