/**
* Add a directory where HTMLHelper should search for helpers. You may
* either pass a string or an array of directories.
*
* @param string $path A path to search.
*
* @return array An array with directory elements
*
* @since 1.5
* @deprecated 5.0 Use the service registry instead
*/
public static function addIncludePath($path = '')
{
@trigger_error('Support for registering lookup paths is deprecated and will be removed in Joomla 5.0, use the service registry instead', E_USER_DEPRECATED);
// Loop through the path directories
foreach ((array) $path as $dir) {
if (!empty($dir) && !\in_array($dir, static::$includePaths)) {
array_unshift(static::$includePaths, Path::clean($dir));
}
}
return static::$includePaths;
}