Back to Cache class

Method addIncludePath

public static array
addIncludePath
(mixed $path = '')
Add a directory where Cache should search for handlers. You may either pass a string or an array of directories.
Parameters
  • array|string $path A path to search.
Returns
  • array An array with directory elements
Since
  • 1.7.0
Class: Cache
Project: Joomla

Method addIncludePath - Source code

/**
 * Add a directory where Cache should search for handlers. You may either pass a string or an array of directories.
 *
 * @param   array|string  $path  A path to search.
 *
 * @return  array   An array with directory elements
 *
 * @since   1.7.0
 */
public static function addIncludePath($path = '')
{
    static $paths;
    if (!isset($paths)) {
        $paths = array();
    }
    if (!empty($path) && !\in_array($path, $paths)) {
        array_unshift($paths, Path::clean($path));
    }
    return $paths;
}