Sets the list of folders and switches to folder provisioning mode.
@param array $folders An array of folders.
@return ServiceProvider Returns $this.
768093
public function setFolders($folders)
    {
        $this->set(self::KEY_FOLDERS, $folders);
        $this->provisioningMode = self::PROVISIONING_MODE_FOLDERS;
        return $this;
    }
729107
public function setFilters(array $filters): AbstractRepository
    {
        foreach ($filters as $f => $v) {
            $this->filterBy($f, $v);
        }

        return $this;
    }
66668
public function setSettings(array $settings)
    {
        $this->settings = array_merge($this->settings, $settings);
        
        if (isset($settings['templates_path'])) {
            $this->view->templatesPath = $this->settings['templates_path'];
        }
        
        return $this;
    }
594573
public function registerProviders(array $providers)
    {
        foreach ($providers as $provider) {
            $this->providers[$provider->getName()] = $provider;
        }
        $this->sortProviders();

        return $this;
    }
968717
public function setServices($services)
    {
        $allowedValues = $this->getServicesAllowableValues();
        if (array_diff($services, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'services', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['services'] = $services;

        return $this;
    }
1359761
public function sharedFilesAndDirs(array $paths = []): self
    {
        $this->sharedDirs = [];
        $this->sharedFiles = [];

        foreach ($paths as $path) {
            $this->validatePathIsRelativeToProject($path, __METHOD__);
            if (is_dir($this->localProjectDir.DIRECTORY_SEPARATOR.$path)) {
                $this->sharedDirs[] = rtrim($path, DIRECTORY_SEPARATOR);
            } else {
                $this->sharedFiles[] = $path;
            }
        }

        return $this;
    }
338998
public function setList(array $ids)
    {
        $this->ids = $ids;
        $this->count = count($ids);
        return $this;
    }
895506
public function createLists(array $lists)
    {
        if (count($lists)) {
            foreach ($lists as $list) {
                $this->createList($list);
            }
        }

        return $this;
    }
256970
public function setTemplateDir($dirs): Sdopx
    {
        $this->templateDirs = [];
        $this->templateJoined = '';
        if (empty($dirs)) {
            return $this;
        }
        if (is_string($dirs)) {
            $this->templateDirs[] = $dirs;
            return $this;
        } elseif (is_array($dirs)) {
            foreach ($dirs as $key => $value) {
                if (!is_string($value) || empty($value)) {
                    continue;
                }
                $this->templateDirs[$key] = $value;
            }
        }
        return $this;
    }
679984
public function in($dirs)
    {
        $resolvedDirs = [];

        foreach ((array) $dirs as $dir) {
            if (is_dir($dir)) {
                $resolvedDirs[] = $this->normalizeDir($dir);
            } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR)) {
                $resolvedDirs = array_merge($resolvedDirs, array_map([$this, 'normalizeDir'], $glob));
            } else {
                throw new DirectoryNotFoundException(sprintf('The "%s" directory does not exist.', $dir));
            }
        }

        $this->dirs = array_merge($this->dirs, $resolvedDirs);

        return $this;
    }
609129
public function setSnapshots($snapshots)
    {
        if (gettype($snapshots) == 'array') {
            $snapshots = new ArrayCollection($snapshots);
        } elseif (!$snapshots instanceof ArrayCollection) {
            $snapshots = new ArrayCollection([$snapshots]);
        }

        foreach ($snapshots as $snapshot) {
            $snapshot->setPage($this);
        }

        $this->snapshots = $snapshots;

        return $this;
    }
732902
public function setClients(array $clients = null)
    {
        ValidationUtility::ensureNullOrArrayOfType(
            '$clients', $clients, __NAMESPACE__ . '\Client');

        $this->clients = $clients;

        return $this;
    }
1273822
public function check(array $folders)
    {
        foreach($folders as $folder => $permission)
        {
            if(!($this->getPermission($folder) >= $permission))
            {
                $this->addFileAndSetErrors($folder, $permission, false);
            }
            else {
                $this->addFile($folder, $permission, true);
            }
        }

        return $this->results;
    }
496241
public function setArchivers(array $archivers)
    {
        $this->archivers = [];

        foreach ($archivers as $archiver) {
            if (!($archiver instanceof ArchiverInterface)) {
                throw new \Exception('ArchiverManager manage only ' . __NAMESPACE__ . '\\ArchiverInterface');
            }

            $this->archivers[$archiver->getId()] = $archiver;
        }

        return $this;
    }
482508
public function setToolbars(array $toolbars)
    {
        $this->_toolbars = array();
        foreach($toolbars as $toolbar) {
            $this->setToolbar($toolbar);
        }

        return $this;
    }
882571
public function setSupportedServiceProfiles(array $serviceProfiles = null)
    {
        ValidationUtility::ensureNullOrArrayOfType(
            '$serviceProfiles', $serviceProfiles, '\Authlete\Types\ServiceProfile');

        $this->supportedServiceProfiles = $serviceProfiles;

        return $this;
    }
1240580
public function getFolders()
    {
        if(!$this->isPropertyAvailable("Folders")){
            $this->setProperty("Folders",
                new FolderCollection($this->getContext(), new ResourcePathEntity($this->getContext(),$this->getResourcePath(), "folders")));
        }
        return $this->getProperty("Folders");
    }