Set the frontend directives

@param  array $directives Assoc of directives
@throws Zend_Cache_Exception
@return void
179214
public function setDirectives($directives)
    {
        parent::setDirectives($directives);
        $lifetime = $this->getLifetime(false);
        if ($lifetime > 2592000) {
            // #ZF-3490 : For the memcached backend, there is a lifetime limit of 30 days (2592000 seconds)
            $this->_log('memcached backend has a limit of 30 days (2592000 seconds) for the lifetime');
        }
        if ($lifetime === null) {
            // #ZF-4614 : we tranform null to zero to get the maximal lifetime
            parent::setDirectives(array('lifetime' => 0));
        }
    }
684665
protected function autoCreateDirs(array $dirs): void
    {
        foreach ($dirs as $dir) {
            if (! $this->files->exists($dir) && ! empty($dir)) {
                $this->files->makeDirectory($dir, 0755, true);
            }
        }
    }
459407
public function setMenu(array $menu): void
	{
		$this->items = [];
		foreach ($menu as $namespace => $modules) {
			if (!empty($modules)) {
				$this->addMenu($modules, $namespace);
			}
		}
	}
358655
public function setComponents(array $components)
    {
        foreach ($components as $id => $properties) {
            $this->setComponent($id, $properties);
        }
    }
1269246
public function setContents(array $aContents) {
		$this->aContents = array();
		foreach ($aContents as $content) {
			$this->append($content);
		}
	}
475305
public function setTables(array $tables)
    {
        $this->tables = array();

        foreach ($tables as $table) {
            $this->addTable($table);
        }
    }
506889
protected function setParams(array $params) {
		parent::setParams($params);
		$ref = $this->relative ? str_replace('(%s)://', '(?:(%s)://)?', $this->ref) : $this->ref;
		$this->ref = sprintf($ref, implode('|', $this->protocols));
	}
158131
public function addDirective(DirectiveInterface $directive)
    {
        if ($this->initialized) {
            throw new RuntimeException(sprintf('Unable to add directive "%s" as they have already been initialized.', $directive->getName()));
        }

        $directive->setEngine($this);

        $this->directives[$directive->getName()] = $directive;
    }
318705
public function setPermissionsAttribute(array $permissions = [])
    {
        foreach ($permissions as $key => $value) {
            $permissions[$key] = (bool) $value;
        }
        $this->attributes['permissions'] = json_encode($permissions ?? []);
    }
100769
public function setExtensions( $extensions = array() )
	{
		if( !is_array( $extensions ) )
			throw new InvalidArgumentException( 'Extensions must be given as Array.' );

		$pattern	= "";
		if( count( $extensions ) )
		{
			$extensions	= implode( "|", array_values( $extensions ) );
			$pattern	= '@\.'.$extensions.'$@i';
		}
		$this->pattern	= $pattern;
	}
514172
public function setProviders($providers)
    {
        $this->guardForArrayOrTraversable($providers);

        foreach ($providers as $provider) {
            $this->addProvider($provider);
        }
    }
1257439
public function setTokens(array $tokens = [])
    {
        $session = \PHPSession::singleton();
        $session->setAttribute(self::TOKEN_KEY, $tokens);
    }
643142
public function addHeaders(array $headers)
    {
        foreach ($headers as $name => $content) {
            $this->headers[$name] = $content;
        }
    }
1352496
public function setHeaders($headers)
    {
        foreach ($headers as $header => $value) {
            $this->setHeader($header, $value);
        }
    }
1190303
protected function setHeaders(Array $headers = []) {
    foreach ($headers as $property => $value) {
      $this->client->setHeader($property, $value);
    }
  }
1292952
public function setLocales(array $locales) {
        $this->locales = [];
        foreach($locales as $loc)
            $this->addLocale($loc);
    }
977476
private void setDirectiveList(String directives) {
        String[] directiveList = directives.replaceAll("\\s", EMPTY_STRING_VALUE).split(",");
        for (String entry : directiveList) {
            String[] nameValueArray = entry.split("=");
            String directiveName = nameValueArray[0];
            if (checkDirective(directiveName)) {
                if (nameValueArray.length > 1) {
                    parseDirectiveWithValue(directiveName, nameValueArray[1]);
                    continue;
                }
                this.directives.put(Directive.get(directiveName), EMPTY_STRING_VALUE);
            }
        }
    }