Sets up the tasks and their dependencies.

@param array $paths List of paths containing setup task classes
544362
protected function _setupTasks( array $paths )
	{
		$this->_tasks = $this->_createTasks( $paths, $this->_schema, $this->_conn, $this->_additional );

		foreach( $this->_tasks as $name => $task )
		{
			foreach( (array) $task->getPreDependencies() as $taskname ) {
				$this->_dependencies[$name][] = $taskname;
			}

			foreach( (array) $task->getPostDependencies() as $taskname ) {
				$this->_dependencies[$taskname][] = $name;
			}
		}
	}
530670
public function addExcludePaths(array $paths) : void
    {
        $this->excludePaths = array_unique(array_merge($this->excludePaths, $paths));
    }
1185898
protected function setUploadedFiles(array &$files)
    {
        $isUploadedFiles = ($files === $_FILES);
        
        $this->files =& $files;
        $this->uploadedFiles = $this->groupUploadedFiles($files, null, $isUploadedFiles);
    }
559329
public function define($task, $commands)
    {
        foreach ($this->connections as $connection) {
            $connection->define($task, $commands);
        }
    }
295342
function loadTasks(string $namespace, $tasks) {
        if (!is_array($tasks))
            $tasks = [$tasks];
        foreach ($tasks as &$task) {
            $class_name = $namespace.$task;
            if (!is_subclass_of($class_name, '\\Acast\\CronService\\TaskInterface')) {
                Console::warning("Invalid class \"$task\".");
                continue;
            }
            $this->addTask($class_name::init());
        }
    }
984415
public function add($path, array $values)
    {
        $get = (array) $this->get($path);
        $this->set($path, $this->arrayMergeRecursiveDistinct($get, $values));
    }
821012
public void setDependencies(Collection<String> dependencies)
    {
        StringBuilder sb = new StringBuilder("");
        for(String dependency : dependencies)
        {
            sb.append(dependency);
            sb.append(File.pathSeparator);
        }

        replace("${classpaths}", sb.toString());
    }
870946
public function assignTasksRoles(array $roles)
    {
        foreach ($roles as $roles => $tasks) {
            $tasks = (array) $tasks;
            $roles = (array) $roles;

            foreach ($tasks as $task) {
                $this->builder->buildTask($task)->addRoles($roles);
            }
        }
    }
874829
public function setDependencies($dependencies)
    {
        if(!is_array($dependencies))
            $dependencies = array($dependencies);

        $this->setProperty('dependencies', $dependencies);

        return $this;
	}
1194241
public static function initialize(?string $path = null): void
    {
        if (self::$isLoaded === true) {
            return;
        }

        // Load dotenv.
        self::$path = $path;
        if (self::$path === null) {
            self::$path = Path::root();
        }
        if (File::exist(self::$path . '/.env')) {
            self::$dotenv = new Dotenv(self::$path);
            self::$dotenv->load();
        }

        // Initialize repositories.
        if (!is_array(self::$repositories)) {
            self::$repositories = [];
        }

        self::$isLoaded = true;
    }
364313
public function setPaths($paths, $namespace = self::DEFAULT_NAMESPACE)
    {
        if (! is_array($paths)) {
            $paths = [$paths];
        }
        $this->paths[$namespace] = [];
        foreach ($paths as $path) {
            $this->addPath($path, $namespace);
        }
    }
336780
protected function loadMigrationsFrom($paths)
    {
        $this->app->afterResolving('migrator', function ($migrator) use ($paths) {
            foreach ((array) $paths as $path) {
                $migrator->path($path);
            }
        });
    }
295004
private function setRoutes(array $routes)
    {
        $this->routes = [];

        foreach ($routes as $name => $route) {
            $this->add($name, $route);
        }
    }
1154379
public function setPaths($paths)
    {
        if ($paths instanceof SplStack) {
            $this->paths = $paths;
        } elseif (is_array($paths)) {
            $this->clearPaths();
            $this->addPaths($paths);
        } else {
            throw new Exception\InvalidArgumentException(
                "Invalid argument provided for \$paths, expecting either an array or SplStack object"
            );
        }

        return $this;
    }
123984
public function setWhiteList($paths)
    {
        $paths = (is_array($paths)) ? $paths : array($paths);

        $this->whiteList = $paths;

        return $this;
    }
563061
public function setProjects($projects)
    {
        $this->_projects = [];
        $token           = ' ,;';
        $project         = strtok($projects, $token);

        while ($project !== false) {
            $this->_projects[] = $project;
            $project           = strtok($token);
        }

    }
1356468
public function setBasePath($path)
    {
        foreach ($this->loaders as $loader) {
            if ($loader instanceof FileLoaderInterface) {
                $loader->setBasePath($path);
            }
        }
    }