/** * Add a path * * @param string $paths The folder(s) to add to the set of paths. * @param bool $prepend Whether to prepend the path to the list of * paths instead of appending it. * * @return void */ protected static function addPath($paths, $prepend = false) { foreach (explode(PATH_SEPARATOR, $paths) as $path) { if (!in_array($path, self::$paths)) { if ($prepend) { self::$paths = array_merge(array($path), self::$paths); } else { self::$paths[] = $path; } } } }