{@inheritDoc}
@see \Ubiquity\contents\validation\validators\Validator::setParams()
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));
	}
187133
public function setParameters($parameters)
    {
        parent::setParameters($parameters);
        if ($parameters !== null) {
            for ($i = 0, $size = count($parameters); $i < $size; $i++) {
                $paramname = $parameters[$i]->getName();
                switch (strtolower($paramname)) {
                    case self::EXPRESSION_KEY:
                        $this->setExpression($parameters[$i]->getValue());
                        break;
                    case self::CASE_KEY:
                        $this->setCasesensitive(Project::toBoolean($parameters[$i]->getValue()));
                        break;
                    case self::ML_KEY:
                        $this->setMultiLine(Project::toBoolean($parameters[$i]->getValue()));
                        break;
                    default:
                        $this->setError("Invalid parameter " . $paramname);
                }
            } // for each param
        } // if params
    }
520862
public function setParams($params): void
    {
        if (! \is_array($params) && ! $params instanceof \ArrayAccess) {
            throw new \InvalidArgumentException('Event params are invalid. Expected type is array or \\ArrayAccess. Got ' . \gettype($params));
        }

        $this->params = $params;
    }
623086
public function setParam($key, $value)
    {
        if(!isset($this->params[$key]) || $this->params[$key] === []) {
            $this->params[$key] = $value;
        }
        else {
            $this->params[$key] = array_merge($this->params[$key], [$value]);
        }
        return $this;
    }
1233507
public function setParameters(array $params): self
    {
        foreach ($params as $key => $value) {
            $this->parameters[$key] = $value;
        }
        return $this;
    }
1181389
public function setParams($params)
    {
        if (is_array($params) && isset($params['application'])) {
            $this->setApplicationEntity($params['application']);
            unset($params['application']);
        } elseif (is_object($params) && isset($params->application)) {
            $this->setApplicationEntity($params->application);
        }

        if (is_array($params) && isset($params['user'])) {
            $this->setUser($params['user']);
            unset($params['user']);
        }

        if (is_array($params) && isset($params['status'])) {
            $this->setStatus($params['status']);
            unset($params['status']);
        }

        return parent::setParams($params);
    }
139160
public function setAdParameters($params)
    {
        $this->adParametersDomElement = $this->getDomElement()->getElementsByTagName('AdParameters')->item(0);
        if (!$this->adParametersDomElement) {
            $this->adParametersDomElement = $this->getDomElement()->ownerDocument->createElement('AdParameters');
            $this->getDomElement()->firstChild->appendChild($this->adParametersDomElement);
        }

        if (is_array($params)) {
            $params = json_encode($params);
        }

        $cdata = $this->adParametersDomElement->ownerDocument->createCDATASection($params);

        // update CData
        if ($this->adParametersDomElement->hasChildNodes()) {
            $this->adParametersDomElement->replaceChild($cdata, $this->adParametersDomElement->firstChild);
        } // insert CData
        else {
            $this->adParametersDomElement->appendChild($cdata);
        }

        return $this;
    }
1242957
public function setParams($params): void
    {
        if (!\is_array($params) && !\is_object($params)) {
            throw new EventException(
                'Event parameters must be an array or object; received `' . \gettype($params) . '`'
            );
        }

        $this->params = $params;
    }
385129
public function setParams( $params )
    {
        if ( $params instanceof Traversable )
        {
            $params = iterator_to_array( $params );
        }
        else if ( is_object( $params ) && ! $params instanceof ArrayAccess )
        {
            $params = (array) $params;
        }

        return parent::setParams( $params );
    }
153760
public function setupParams($params = [])
    {
        if (is_array($params)) {
            $this->params = array_merge($this->params, $params);
        }
        return $this;
    }
1176611
public function prepareParms($params)
    {
        if (is_array($params)) {
            foreach ($params as $key => $value) {
                array_push($this->setParams, $value);
            }
        } else {
            array_push($this->setParams, $params);
        }
    }
776839
public function validate($params)
    {
        $params = $this->boolParams($params);

        if (!empty($params['html']) && (!empty($params['url']) || !empty($params['file'])))
            throw new InvalidParameterException("Only one of [html, url, file] parameters can be set!");

        if (!empty($params['url']) && !empty($params['file']))
            throw new InvalidParameterException("Only one of [html, url, file] parameters can be set!");

        if ((!empty($params['page_width']) && empty($params['page_height']))
            ||(empty($params['page_width']) && !empty($params['page_height'])))
        {
            throw new InvalidParameterException('Page width and page height must both be set or unset!');
        }
        if (!empty($params['filename']) && !is_string($params['filename']))
            throw new InvalidParameterException('Filename must be a string.');

        if (!empty($params['footer']) && !is_string($params['footer']))
            throw new InvalidParameterException('Footer must be a string.');

        if (!empty($params['header']) && !is_string($params['header']))
            throw new InvalidParameterException('Header must be a string.');

        if (!empty($params['header_spacing']) && !is_int($params['header_spacing']))
            throw new InvalidParameterException('Header spacing parameter must be an integer.');

        if (!empty($params['footer_spacing']) && !is_int($params['footer_spacing']))
            throw new InvalidParameterException('Footer spacing parameter must be an integer.');

        if (!empty($params['page_size']) && !is_string($params['page_size']))
            throw new InvalidParameterException('Page size must be a string of some standard page size.');

        if (!empty($params['dpi']) && (!is_int($params['dpi']) || $params['dpi']<75))
            throw new InvalidParameterException('DPI must be an integer larger than 75.');

        if (!empty($params['image_dpi']) && !is_int($params['image_dpi']))
            throw new InvalidParameterException('Image DPI must be an integer.');

        if (!empty($params['lowquality']) && (!is_int($params['lowquality']) || !in_array($params['lowquality'], array(
                    0, 1 ) )))
            throw new InvalidParameterException(
                'Lowquality must be either 0 or 1 (alternative: use bool values');

        if (!empty($params['orientation']) && (!is_string($params['orientation']) || !in_array($params['orientation'],
                array("landscape", "portrait"))))
            throw new InvalidParameterException('Orientation must be set to either "landscape" or "portrait"');

        if (!empty($params['margin_top']) && !is_int($params['margin_top']))
            throw new InvalidParameterException('Margin top must be an integer.');

        if (!empty($params['margin_bottom']) && !is_int($params['margin_bottom']))
            throw new InvalidParameterException('Margin top must be an integer.');

        if (!empty($params['margin_left']) && !is_int($params['margin_left']))
            throw new InvalidParameterException('Margin top must be an integer.');

        if (!empty($params['margin_right']) && !is_int($params['margin_right']))
            throw new InvalidParameterException('Margin top must be an integer.');

        if (!empty($params['background']) && (!is_int($params['background']) || !in_array($params['background'], array(
                    0, 1 ) )))
            throw new InvalidParameterException(
                'Background must be either 0 or 1 (alternative: use bool values');

        if (!empty($params['images']) && (!is_int($params['images']) || !in_array($params['images'], array(
                    0, 1 ) )))
            throw new InvalidParameterException(
                'Images must be either 0 or 1 (alternative: use bool values');

        if (!empty($params['page_width']) && !is_int($params['page_width']))
            throw new InvalidParameterException('Page width must be an integer.');

        if (!empty($params['page_height']) && !is_int($params['page_height']))
            throw new InvalidParameterException('Page height must be an integer.');

        if (!empty($params['disposition']) && (!is_string($params['disposition']) || !in_array($params['disposition'],
                    array("attachment", "inline"))))
            throw new InvalidParameterException('Disposition can only be "attachment or "inline"');

        if (!empty($params['group']) && !is_string($params['group']))
            throw new InvalidParameterException('Group must be a string.');

        if (!empty($params['engine_version']) && (!is_int($params['engine_version']) || !in_array($params['engine_version'],
        array( 11, 12 ) )))
            throw new InvalidParameterException(
                'Engine version can be integer 11 or 12');

        if (!empty($params['title']) && !is_string($params['title']))
            throw new InvalidParameterException('Title must be a string.');

        if (!empty($params['outline']) && (!is_int($params['outline']) || !in_array($params['outline'], array(
                    0, 1 ) )))
            throw new InvalidParameterException(
                'Outline must be either 0 or 1 (alternative: use bool values');

        if (!empty($params['outline_depth']) && !is_int($params['outline_depth']))
            throw new InvalidParameterException('Outline depth must be an integer.');

        if (!empty($params['encoding']) && !is_string($params['encoding']))
            throw new InvalidParameterException('Encoding must be a string.');

        if (!empty($params['javascript']) && (!is_int($params['javascript']) || !in_array($params['javascript'], array(
                    0, 1 ) )))
            throw new InvalidParameterException(
                'Javascript must be either 0 or 1 (alternative: use bool values');

        if (!empty($params['javascript_delay']) &&
            (!is_int($params['javascript_delay']) || $params['javascript_delay']<1 || $params['javascript_delay']>800))
            throw new InvalidParameterException('Javascript delay must be an integer larger than 1, but smaller than 800.');

        if (!empty($params['internal_links']) &&
            (!is_int($params['internal_links']) || !in_array($params['internal_links'], array( 0, 1 ) )))
            throw new InvalidParameterException(
                'Internal links must be either 0 or 1 (alternative: use bool values');

        if (!empty($params['external_links']) &&
            (!is_int($params['external_links']) || !in_array($params['external_links'], array( 0, 1 ) )))
            throw new InvalidParameterException(
                'External links must be either 0 or 1 (alternative: use bool values');

        if (!empty($params['page_offset']) && !is_int($params['page_offset']))
            throw new InvalidParameterException('Page offset must be an integer.');

        if (!empty($params['username']) && !is_string($params['username']))
            throw new InvalidParameterException('Username must be a string.');

        if (!empty($params['password']) && !is_string($params['password']))
            throw new InvalidParameterException('Password must be a string.');

        if (!empty($params['use_print_media']) &&
            (!is_int($params['use_print_media']) || !in_array($params['use_print_media'], array(
                    0, 1 ) )))
            throw new InvalidParameterException(
                'Use print media must be either 0 or 1 (alternative: use bool values');

        if (!empty($params['zoom']) && !is_numeric($params['zoom']))
            throw new InvalidParameterException('Zoom must be an integer.');

        if (!empty($params['viewport_size']) &&
            (!is_string($params['viewport_size'] || preg_match("^\\d+x\\d+$", $params['viewport_size']))))
            throw new InvalidParameterException('Viewport must be a string of a following format: [width]x[height].');

        if (!empty($params['id']) && !is_string($params['id']))
            throw new InvalidParameterException('ID must be a string.');

        /*if (!empty($params['file']))
            $this->validateFile($params['file']);*/

        return $params;
    }
1077369
public function setFileParameters(array $fileParameters)
    {
        foreach ($fileParameters as $name => $value) {
            $this->setFileParameter($name, $value);
        }
    }
211880
public function setParameters(array $parameters, $append = false)
    {
        if (!$append) {
            $this->parameters = $parameters;
        } else {
            foreach ($parameters as $field => $value) {
                $this->setParameter($field, $value);
            }
        }
    }
1019040
public function setParametersAttribute($parameters)
    {
        if (is_array($parameters)) {
            $this->attributes['parameters'] = json_encode($parameters);
        } else {
            $this->attributes['parameters'] = $parameters;
        }
    }
10507
protected function _setInputParams(array &$params) {
        foreach ($params as $paramKey => $paramValue) {
            if (in_array($paramKey, $this->args, true)
                && !is_null($paramValue)
            ) {
                $this->_inputParams[$paramKey] = $paramValue;
            }
        }

        $this->_params = array_merge($this->_params, $this->_inputParams);
    }
153015
private function _setParams($value, $params)
    {
        $strFinal = $value;
        $key = '';
        for ($i = 0; $i < strlen($strFinal); $i++) {
            if ($strFinal[$i] == ':') { // 1º
                $_a = $i + 1;
                for ($j = $_a; $j < strlen($strFinal); $j++) {
                    $isLastOne = ($j == strlen($strFinal) - 1);
                    if (in_array($strFinal[$j],
                            [
                                ' ',
                                ',',
                                '\\',
                                '\'',
                                '"'
                            ]) || $isLastOne
                    ) { // 2º
                        $_b = $j;
                        $_b = ($isLastOne) ? $_b + 1 : $_b;
                        $key = substr($strFinal, $_a, $_b - $_a);
                        $i = $_b;
                        break;
                    }
                }

                // We found the key
                if (isset($params[$key])) {
                    $langKey = $params[$key];
                    $strFinalA = substr($strFinal, 0, $_a - 1);
                    $strFinalB = substr($strFinal, $_b);
                    $strFinal = $strFinalA . $langKey . $strFinalB;
                }
            }
        }
        return $strFinal;
    }