/**
* Registers a function to be called with a specific key
*
* @param string $key The name of the key
* @param callable $function Function or method
*
* @return boolean True if the function is callable
*
* @since 1.6
* @deprecated 5.0 Use the service registry instead
*/
public static function register($key, callable $function)
{
@trigger_error('Support for registering functions is deprecated and will be removed in Joomla 5.0, use the service registry instead', E_USER_DEPRECATED);
list($key) = static::extract($key);
static::$registry[$key] = $function;
return true;
}