Adds paths to the underlying collectors and tree generators.

@param array $paths
@throws \NewUp\Exceptions\InvalidPathException
437027
public function addPaths(array $paths)
    {
        $this->currentCollectorData = $this->filePathCollector->collect();

        foreach ($paths as $path) {
            $this->addPath($path);
        }
    }
1349729
public function setPaths(array $paths, $clearCache = true, $group = '__DEFAULT__')
	{
		$this->paths[$group] = [];
		$this->addPaths($paths, false, $group);

		if ($clearCache)
		{
			$this->cache = [];
		}
	}
550084
public function processMultiplePaths($paths)
    {
        $paths = $this->parseAsArray($paths);
        $paths = array_map([ $this, 'filterPath' ], $paths);
        $paths = array_filter($paths, [ $this, 'pathExists' ]);

        if ($paths === false) {
            throw new InvalidArgumentException('Received invalid paths.');
        }

        if (empty($paths)) {
            throw new InvalidArgumentException('Received empty paths.');
        }

        return $paths;
    }
925486
public function bindInstallPaths(array $paths)
    {
        if ($this->runningOnGae)
        {
            $this->instance('path', gae_realpath($paths['app']));

            // Here we will bind the install paths into the container as strings that can be
            // accessed from any point in the system. Each path key is prefixed with path
            // so that they have the consistent naming convention inside the container.
            foreach (array_except($paths, array('app', 'storage')) as $key => $value)
            {
                $this->instance("path.{$key}", gae_realpath($value));
            }

            $this->bindStoragePath();
        }
        else
        {
            parent::bindInstallPaths($paths);
        }
    }
384270
private function setupRegisteredModules($modules, $paths)
    {
        if (empty($modules) || empty($paths)) {
            throw new Exception\InvalidArgumentException('Invalid parameters for init phalcon extesion');
        }
        foreach ($modules as $moduleName) {
            $found = false;
            foreach ($paths as $path) {
                $modulePath = $path . DIRECTORY_SEPARATOR . $moduleName . DIRECTORY_SEPARATOR . 'Module.php';
                if (file_exists($modulePath)) {
                    $found = true;

                    $this->modules[$moduleName] = [
                        'className' => $moduleName . '\\Module',
                        'path'      => $modulePath,
                    ];
                    break;
                }
            }
            if (!$found) {
                throw new Exception\RuntimeException(sprintf('Not found module "%s"', $moduleName));
            }
        }
    }
606956
public function addRoutes($routes)
    {
        if (!is_array($routes)) {
            throw new \InvalidArgumentException("Routes must be an array");
        }

        $routes = array_filter($routes, function ($route) {
            return is_a('Route', $route);
        });

        $this->routes = array_merge($this->routes, $routes);
    }
807801
protected function addPathToViewPaths(array &$paths, $host)
    {
        $path = $this->createViewPath($host);

        if ($path && !in_array($path, $paths)) {
            $paths[] = $path;
        }

        return $path;
    }
1073667
public function addHelperPath(string $path): void
    {
        $class = static::class;
        $realPath = realpath($path);

        if (false === $realPath) {
            throw new CommonException("Invalid Helper path `$path` for class `$class`");
        }

        // create store of helpers
        if (!isset(static::$helpersPath[$class])) {
            static::$helpersPath[$class] = [];
        }

        if (!\in_array($realPath, static::$helpersPath[$class], true)) {
            static::$helpersPath[$class][] = $realPath;
        }
    }
871884
public function load(string $path, string ...$paths): void
    {
        array_unshift($paths, $path);
        foreach ($paths as $path) {
            if (!is_readable($path) || is_dir($path) || ($contents = parse_ini_file($path, false)) === false) {
                throw new InvalidArgumentException("{$path} is not a readable file.");
            }
            $this->populate($contents);
        }
    }
603016
public function setPaths($paths)
    {
        $paths = (array)$paths;
        //Append framework's view path
        $paths[] = realpath(__DIR__ . '/../../views');

        $this->paths = $paths;
        return $this;
    }
472059
private function createLoader(array $paths)
    {
        $loader = new \Twig\Loader\FilesystemLoader();

        foreach ($paths as $namespace => $path) {
            if (is_string($namespace)) {
                $loader->setPaths($path, $namespace);
            } else {
                $loader->addPath($path);
            }
        }

        return $loader;
    }
1135916
public function addPath($path)
    {
        // just force to array
        settype($path, 'array');

        // loop through the path directories
        foreach ($path as $dir) {
            // no surrounding spaces allowed!
            $dir = trim($dir);

            // remove trailing slash
            if (substr($dir, -1) == DIRECTORY_SEPARATOR) {
                $dir = substr_replace($dir, '', -1);
            }

            // add to the top of the search dirs
            array_unshift($this->_paths, $dir);
        }
    }
500941
public void setPaths(@Nonnull List<Path> paths) {
        ArgumentUtils.requireNonNull("paths", paths);
        this.paths = paths;
    }
331471
private function addDestinations(array $destinations)
    {
        foreach ($destinations as $destination) {
            if (!$destination instanceof DestinationInterface) {
                throw new \InvalidArgumentException(get_class($destination) . ' is not a valid destination');
            }

            $this->destinations[] = $destination;
        }
    }
1096657
public function addFontDirectories(array $paths): self
    {
        $projectDir = System::getContainer()->get('huh.utils.container')->getProjectDir();

        $defaultConfig = (new  ConfigVariables())->getDefaults();
        $fontDirs = $defaultConfig['fontDir'];

        foreach ($paths as $path) {
            $fontDir = $projectDir.\DIRECTORY_SEPARATOR.ltrim($path, \DIRECTORY_SEPARATOR);

            if (!file_exists($fontDir) || !file_exists($fontDir.\DIRECTORY_SEPARATOR.'mpdf-config.php')) {
                continue;
            }

            $configPath = $fontDir.\DIRECTORY_SEPARATOR.'mpdf-config.php';
            $fontConfig = require_once $configPath;

            if (!\is_array($fontConfig)) {
                continue;
            }

            if (!isset($fontConfig['fontDir'])) {
                $fontConfig['fontDir'] = array_merge($fontDirs, [
                    $fontDir,
                ]);
            }

            $this->config = array_merge($this->config, $fontConfig);
        }

        return $this;
    }
1115682
public function addPaths($paths)
    {
        $paths = is_array($paths) ? $paths : [$paths];

        foreach ($paths as $key => $path) {
            $key = is_int($key) ? null : $key;

            $this->addPath($path, $key);
        }

        return $this;
    }
215303
public  function addClassPath($path) {
        if(!is_array($path)) {
            $path = array($path);
        }
        foreach($path as $item) {
            $this->classPaths[] = $item;
        }
    }