Load parameters located inside the request object.

@param mixed[] $values
@throws \Exception
553119
private function loadRequestParameters($values)
    {
        foreach ($values as $param => $value) {
            $this->request->prependParameter($param, $value);
        }
    }
82131
public function init(array $values = [])
    {
        if ($this->app) {
            return false;
        }

        $this->app = new Application($values);

        return $this;
    }
328611
public function setParameters($parameters)
    {
        // type check, error must never occur, bad code of it does
        if (!is_array($parameters)) {
            throw new Exception("Expected parameters array got something else");
        }

        $this->_parameters = $parameters;
        $this->setInitialized(false);
    }
330015
public function setHeaders(array $values)
    {
        foreach ($values as $key => $value) {
            $this->setHeader($key, $value);
        }
    }
1361881
protected function launchFilters(array $values)
    {
        foreach ($this->filters as $filter) {
            $values = call_user_func($filter, $values);

            if (!is_array($values)) {
                throw new ModelException(sprintf("Filter error. Filters MUST return an array of values."));
            }
        }

        return $values;
    }
714999
protected function addValues($values)
    {
        if (!is_array($values) && !$values instanceof \Traversable) {
            //Unable to process values
            return;
        }

        foreach ($values as $value) {
            //Passing every value thought the filter
            $value = $this->filterValue($value);
            if (!is_null($value)) {
                $this->values[] = $value;
            }
        }
    }
414132
public function execute($values=null)
    {
        $ok = false;
        set_error_handler(array($this->_pdooci,"errorHandler"));
        try {
            $auto = $this->_pdooci->getAutoCommit() ? \OCI_COMMIT_ON_SUCCESS : \OCI_NO_AUTO_COMMIT;

            if ($values && sizeof($values)>0) {
                foreach ($values as $key => $val) {
                    $parm = $key;
                    if (preg_match('/^\d+$/', $key)) {
                        $parm ++;
                    }
                    $this->bindParam($parm, $values[$key]);
                    $this->_pdooci->setError();
                }
            }
            $ok = \oci_execute($this->_stmt, $auto);
            if (!$ok) {
                $this->_pdooci->setError($this->_stmt);
                $error = $this->_pdooci->errorInfo();
                throw new \PDOException($error[2]);
            } else {
                if (count($this->_bindsLob)) {
                    foreach ($this->_bindsLob as $param => $bind) {
                        $ok = $bind['lob']->save($bind['value']);
                        if (!$ok) {
                            $error = $this->_pdooci->errorInfo();
                            $e = new \PDOException($error[2], $error[1]);
                            $e->errorInfo = $error;
                            throw $e;
                        }
                    }
                }
            }
        } catch (\PDOException $e) {
            throw $e;
        } catch (\Exception $e) {
            throw new \PDOException($e->getMessage());
        }
        restore_error_handler();
        return $ok;
    }
820992
final protected function parameterIds(array $values) : array
    {
        foreach ($values as $key => $value) {
            $values[$key] = Expr::idParam($value);
        }

        return $values;
    }
433440
public function load_values(array $values, $clean = FALSE)
  {
    if($clean === TRUE)
    {
      $this->before_load();

      $this->_object = $values;
      $this->_loaded = ! empty($this->_object);

      $this->after_load();
    }
    else
    {
      foreach ($values as $field => $value)
      {
        $this->__set($field, $value);
      }
    }

    return $this;
  }
141747
public function tryGetOptionsForValues(array $values): array
    {
        if ($this->specificFieldOptionLoader) {
            return array_filter(array_map($this->specificFieldOptionLoader, $values));
        } else {
            return (new ArrayFieldOptions(call_user_func($this->fieldOptionsLoader)))->tryGetOptionsForValues($value);
        }
    }
689506
public static function parseArray(array $values) {

        // Initialize the output.
        $output = [];

        // Handle each value.
        foreach ($values as $key => $value) {

            // Check if the value is null.
            if (null === $value) {
                continue;
            }

            // Check if the value is an array.
            if (true === is_array($value)) {
                $buffer = trim(implode(" ", $value));
            } else {
                $buffer = trim($value);
            }

            // Check if the buffer is not empty.
            if ("" !== $buffer) {
                $output[] = $key . "=\"" . preg_replace("/\s+/", " ", $buffer) . "\"";
            }
        }

        // Concatenates all attributes.
        return implode(" ", $output);
    }
343326
public function bindValues($values)
    {
        foreach($values as $k => $v)
        {
            $this->binds[$k] = $v;
        }
        return $this;
    }
1105412
protected function iterate($values)
    {
        if (!is_object($values) && !is_array($values)) {
            throw new \InvalidArgumentException("Unable to validate provided object");
        }
        $errors = [];
        foreach ($this->ruleset as $field => $rules) {
            $value = $this->access($values, $field);
            $error = $rules->apply($value, $values);
            if ($error !== null) {
                $errors[$field] = count($error) > 1 || count(array_filter(array_keys($error), 'is_string')) > 0 ?
                    $error : current($error);
            }
        }
        return $errors;
    }
424019
function add(array $parameters): void
    {
        foreach ($parameters as $parameter => $value) {
            $this->query[$parameter] = $value;
        }
    }
1317147
protected function setFields($values)
    {
        foreach ($values[0]->fields as $name => $field) {
            $this->fields[$name] = $field;
        }
    }
766872
public function put($values = [])
	{
		// The usual checks.
		if (empty($values) || !$this->_app->name)
			return [];

		// Work with arrays.
		$values = (array) $values;

		// Does it exists?
		if (!$this->_config)
			$this->getConfig();

		// Perform. Overwrite the values.
		$this->_config = array_merge($this->_config, $values);

		// Save it.
		updateSettings(array('_config'. $this->_app->name => json_encode($this->_config)));

		// Done!
		return $this->_config;
	}
981832
protected function add(array $values)
    {
        $values =
                $this->dispatchBeforeOperationEvent(
                        '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Language\BeforeLanguageAddingEvent',
                        LanguageEvents::BEFORE_ADD_LANGUAGE,
                        $values,
                        array(
                            'message' => 'exception_language_adding_aborted',
                            'domain' => 'exceptions',
                        )
                );

        try {
            $this->validator->checkEmptyParams($values);
            $this->validator->checkRequiredParamsExists(array('LanguageName' => ''), $values);
            if ($this->validator->languageExists($values['LanguageName'])) {
                throw new LanguageException\LanguageExistsException('exception_language_already_exists');
            }

            if (empty($values['LanguageName'])) {
                throw new General\ArgumentIsEmptyException('exception_null_language_name');
            }

            $result = true;
            $this->languageRepository->startTransaction();

            $hasLanguages = $this->validator->hasLanguages();
            $values['MainLanguage'] = ($hasLanguages) ? (isset($values['MainLanguage'])) ? $values['MainLanguage'] : 0 : 1;
            if ($values['MainLanguage'] == 1 && $hasLanguages) {
                $result = $this->resetMain();
            }

            if ($result) {
                // Saves the language
                if (null === $this->alLanguage) {
                    $className = $this->languageRepository->getRepositoryObjectClassName();
                    $this->alLanguage = new $className();
                }

                $values = $this->checkCreatedAt($values);
                $result = $this->languageRepository
                            ->setRepositoryObject($this->alLanguage)
                            ->save($values);
                if (false !== $result) {
                    $eventName = LanguageEvents::BEFORE_ADD_LANGUAGE_COMMIT;
                    $result = !$this->eventsHandler
                                    ->createEvent($eventName, '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Language\BeforeAddLanguageCommitEvent', array($this, $values))
                                    ->dispatch()
                                    ->getEvent($eventName)
                                    ->isAborted();
                }
            }

            if (false !== $result) {
                $this->languageRepository->commit();

                $this->eventsHandler
                     ->createEvent(LanguageEvents::AFTER_ADD_LANGUAGE, '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Language\AfterLanguageAddedEvent', array($this))
                     ->dispatch();

                return $result;
            }

            $this->languageRepository->rollBack();

            return $result;
        } catch (\Exception $e) {
            if (isset($this->languageRepository) && $this->languageRepository !== null) {
                $this->languageRepository->rollBack();
            }

            throw $e;
        }
    }