@param string $zone
@param array $parameters
@param array $override

@return string
@author Maximilian Ruta <mr@xtain.net>
483912
public function renderModulePosition($zone, array $parameters = [], array $override = [])
    {
        $this->joomla->getApplication();

        $modules = \JModuleHelper::getModules($zone);
        $modulesClones = [];
        foreach ($modules as $module) {
            $modulesClones[] = $this->renderModuleObject($module, $parameters, $override);
        }

        $result = '';
        if (isset($parameters['decorator'])) {
            $result = $this->twig->render($parameters['decorator'], [
                'modules' => $modulesClones
            ]);
        } else {
            foreach ($modulesClones as $moduleClone) {
                $result .= $moduleClone->content;
            }
        }

        return $result;
    }
251589
protected function prepareHeaders($method, $url, array $params, array $overrides = [])
    {
        $oauth = array_merge([
            'oauth_consumer_key'     => $this->consumerKey,
            'oauth_nonce'            => md5(uniqid(rand(), true)),
            'oauth_signature_method' => 'HMAC-SHA1',
            'oauth_timestamp'        => time(),
            'oauth_version'          => '1.0A',
            'oauth_token'            => $this->oauthToken,
        ], $overrides);

        foreach ($oauth as $k => $v) {
            $oauth[$k] = rawurlencode($v);
        }

        foreach ($params as $k => $v) {
            $params[$k] = rawurlencode($v);
        }

        $sigParams = array_merge($oauth, $params);
        ksort($sigParams);

        $oauth['oauth_signature'] = rawurlencode($this->generateSignature($method, $url, $sigParams));

        return $oauth;
    }
244279
public function customizeEpub( $overrides = [] ) {
		$path = $this->getPathToEpubScss();
		if ( $path ) {
			return $this->customize( 'epub', \Pressbooks\Utility\get_contents( $path ), $overrides );
		}
		return '';
	}
1086604
public function setAttributeOverride($fieldName, array $overrideMapping)
    {
        if ( ! isset($this->fieldMappings[$fieldName])) {
            throw MappingException::invalidOverrideFieldName($this->name, $fieldName);
        }

        $mapping = $this->fieldMappings[$fieldName];

        if (isset($mapping['id'])) {
            $overrideMapping['id'] = $mapping['id'];
        }

        if ( ! isset($overrideMapping['type']) || $overrideMapping['type'] === null) {
            $overrideMapping['type'] = $mapping['type'];
        }

        if ( ! isset($overrideMapping['fieldName']) || $overrideMapping['fieldName'] === null) {
            $overrideMapping['fieldName'] = $mapping['fieldName'];
        }

        if ($overrideMapping['type'] !== $mapping['type']) {
            throw MappingException::invalidOverrideFieldType($this->name, $fieldName);
        }

        unset($this->fieldMappings[$fieldName]);
        unset($this->fieldNames[$mapping['columnName']]);
        unset($this->columnNames[$mapping['fieldName']]);
        $this->_validateAndCompleteFieldMapping($overrideMapping);

        $this->fieldMappings[$fieldName] = $overrideMapping;
    }
895792
private function searchOverridenParameters(array $parametersList): array
    {
        $parametersUsageCount = [];

        foreach ($parametersList as $list) {
            foreach ($list as $parameter => $_value) {
                if (!isset($parametersUsageCount[$parameter])) {
                    $parametersUsageCount[$parameter] = 0;
                }

                $parametersUsageCount[$parameter] += 1;
            }
        }

        $overriddenParameters = array_filter($parametersUsageCount, function ($count) {
            return $count > 1;
        });

        return array_keys($overriddenParameters);
    }
1289640
public function getActionPermissions($override = false)
	{
		//make sure we only run this once and then return the cached version
		if (!sizeof($this->actionPermissions) || $override)
		{
			$this->actionPermissions = array();
			$model = $this->config->getDataModel();
			$options = $this->config->getOption('action_permissions');
			$defaults = $this->actionPermissionsDefaults;

			//merge the user-supplied action permissions into the defaults
			$permissions = array_merge($defaults, $options);

			//loop over the actions to build the list
			foreach ($permissions as $action => $callback)
			{
				if (is_callable($callback))
				{
					$this->actionPermissions[$action] = (bool) $callback($model);
				}
				else
				{
					$this->actionPermissions[$action] = (bool) $callback;
				}
			}
		}

		return $this->actionPermissions;
	}
835229
public function translate(array $overrides = [])
    {
        array_replace_recursive($this->parameters, $overrides);

        $id = isset($this->parameters['id']) ? $this->parameters['id'] : null;
        $value = isset($this->parameters['value']) ? $this->parameters['value'] : null;
        $arguments = isset($this->parameters['arguments']) ? $this->parameters['arguments'] : [];
        $source = isset($this->parameters['source']) ? $this->parameters['source'] : 'Main';
        $package = isset($this->parameters['package']) ? $this->parameters['package'] : null;
        $quantity = isset($this->parameters['quantity']) ? $this->parameters['quantity'] : null;
        $locale = isset($this->parameters['locale']) ? $this->parameters['locale'] : null;

        if ($id === null) {
            return $this->translator->translateByOriginalLabel($value, $arguments, $quantity, $locale, $source, $package);
        }

        $translation = $this->translator->translateById($id, $arguments, $quantity, $locale, $source, $package);
        if ($translation === null && $value !== null) {
            return $this->translator->translateByOriginalLabel($value, $arguments, $quantity, $locale, $source, $package);
        }

        return $translation;
    }
1161837
public function overrideArticle(ArticleOverrideMessage $message): Article
    {
        $path = sprintf('sites/%d/articles/%d/override', $message->getSiteId(), $message->getArticleId());

        $response = $this->getClient()->sendRequest(RequestStatus::GET, $path);

        /** @var Article $model */
        $model = $this->getModelFactory()->create(Article::class, $response);

        return $model;
    }
570703
public function getGlobalActionsOptions($override = false)
	{
		//make sure we only run this once and then return the cached version
		if (!sizeof($this->globalActionsOptions) || $override)
		{
			$this->globalActionsOptions = array();

			//loop over the global actions to build the list
			foreach ($this->getGlobalActions($override) as $name => $action)
			{
				$this->globalActionsOptions[] = $action->getOptions();
			}
		}

		return $this->globalActionsOptions;
	}
1058815
protected function overrideConfig(array $override, Repository $config, Settings $settings, Dispatcher $dispatcher)
    {
        foreach ($override as $key => $settingKey) {
            $configKey = is_string($key) ? $key : $settingKey;

            $dispatcher->fire("settings.overriding: {$configKey}", [$configKey, $settingKey]);

            $settingValue = $settings->get($settingKey);
            $configValue = $config->get($configKey);

            $config->set($configKey, $settingValue);

            $dispatcher->fire("settings.override: {$configKey}", [
                $configKey, $configValue, $settingKey, $settingValue
            ]);
        }
    }
1157104
private function exportToSingle(array $configurations, array $overrideData)
    {
        $configurations = array_replace_recursive($configurations, $overrideData);
        FileHelper::writeToFile($this->file, Data::toYaml($configurations));
        Schematic::info('Exported schema to '.$this->file);
    }
373071
public String getOverrideForce(String configurationId, String parameterName) {
    Map<String, String> overrideForceScopeMapEntry = overrideForceScopeMap.get(configurationId);
    if (overrideForceScopeMapEntry != null) {
      return overrideForceScopeMapEntry.get(parameterName);
    }
    return null;
  }
130132
public function setVariables($variables, $overwrite = false)
    {
        if (is_array($variables) || $variables instanceof Traversable) {
            return parent::setVariables($variables, $overwrite);
        }

        if ($variables instanceof \JsonSerializable) {
            $variables = $variables->jsonSerialize();

            return parent::setVariables($variables, $overwrite);
        }

        if (is_object($variables) && method_exists($variables, 'toArray')) {
            $variables = $variables->toArray();

            return parent::setVariables($variables, $overwrite);
        }

        if (is_object($variables) && method_exists($variables, '_toArray')) {
            $variables = $variables->_toArray();

            return parent::setVariables($variables, $overwrite);
        }

        if (is_object($variables) && method_exists($variables, '__toArray')) {
            $variables = $variables->__toArray();

            return parent::setVariables($variables, $overwrite);
        }

        return parent::setVariables($variables, $overwrite);
    }
409086
public function set($key, $value = null, $override = false)
    {
        // if key is array,
        // loop the set, while expecting value parameter to be override
        if(is_array($key))
        {
            $override = $value;

            foreach($key as $k => $val)
            {
                if($override === true)
                    $this->setOverride($k, $val);
                else
                    $this->data[$k] = $val;
            }

            return $this;
        }
        else
        {
            if($override === true)
                $this->setOverride($key, $value);
            else
                $this->data[$key] = $value;

            return $this;
        }
    }
903912
private function getOverrideMethod(string $requestMethod, ServerRequestInterface $request)
	{
		switch ($requestMethod) {
			case 'POST':
				if ($this->parsedBodyParameter !== null) {
					$method = $request->getParsedBody()[$this->parsedBodyParameter] ?? null;
				}
				break;

			case 'GET':
				if ($this->queryParameter !== null) {
					$method = $request->getQueryParams()[$this->queryParameter] ?? null;
				}
				break;
		}

		if (!isset($method)) {
			$method = $request->getHeaderLine(self::HEADER);
		}

		return \strtoupper($method);
	}
690683
@Nonnull
    public ParametersAction createUpdated(Collection<? extends ParameterValue> overrides) {
        if(overrides == null) {
            ParametersAction parametersAction = new ParametersAction(parameters);
            parametersAction.safeParameters = this.safeParameters;
            return parametersAction;
        }
        List<ParameterValue> combinedParameters = Lists.<ParameterValue>newArrayList(overrides);
        Set<String> names = newHashSet();

        for(ParameterValue v : overrides) {
            if (v == null) continue;
            names.add(v.getName());
        }

        for (ParameterValue v : parameters) {
            if (v == null) continue;
            if (!names.contains(v.getName())) {
                combinedParameters.add(v);
            }
        }

        return new ParametersAction(combinedParameters, this.safeParameters);
    }
128534
public function setControllerSettings(array $settings, $override = false)
    {
        $this->controllerSettings = $override ? $settings : array_replace($this->controllerSettings, $settings);
    }