Back to HTMLHelper class

Method unregister

public static bool
unregister
(mixed $key)
Removes a key for a method from registry.
Parameters
  • string $key The name of the key
Returns
  • bool True if a set key is unset
Since
  • 1.6
Deprecated
  • 5.0
Class: HTMLHelper
Project: Joomla

Method unregister - Source code

/**
 * Removes a key for a method from registry.
 *
 * @param   string  $key  The name of the key
 *
 * @return  boolean  True if a set key is unset
 *
 * @since       1.6
 * @deprecated  5.0 Use the service registry instead
 */
public static function unregister($key)
{
    @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);
    if (isset(static::$registry[$key])) {
        unset(static::$registry[$key]);
        return true;
    }
    return false;
}