Set the request information.

@param array An associative array of request information

@return LibBaseControllerAbstract
194254
public function setRequest(array $request)
    {
        parent::setRequest($request);

        if (isset($this->_request->return)) {
            $return = $this->getService('com:people.filter.return')
                           ->sanitize($this->_request->return);
            $this->_request->return = $return;
            $this->return = $return;
        }

        return $this;
    }
514409
public function setQueryVariables($array)
    {
        if (! is_array($array)) {

            throw new InvalidArgumentException('Must pass an array to setQueryVariables()');
        }

        $parts = array();

        foreach ($array as $name => $value) {

            $name = urlencode($name);

            if (! is_null($value)) {

                $parts[] = $name . '=' . urlencode($value);

            } else {

                $parts[] = $name;
            }
        }

        $this->setQuery(implode('&', $parts));
    }
674021
public function setAddress(array $address)
    {
        if (!empty($address) && is_array($address)) {
            $this->address = $address;
        }

        return $this;
    }
1241609
public function copyFromArray(array &$array)
    {
        // ticket
        $this->setTicket(
            LanguageUtility::getFromArray('ticket', $array));

        // subject
        $this->setSubject(
            LanguageUtility::getFromArray('subject', $array));

        // sub
        $this->setSub(
            LanguageUtility::getFromArray('sub', $array));

        // authTime
        $this->setAuthTime(
            LanguageUtility::getFromArray('authTime', $array));

        // acr
        $this->setAcr(
            LanguageUtility::getFromArray('acr', $array));

        // claims
        $this->setClaims(
            LanguageUtility::getFromArray('claims', $array));

        // properties
        $properties = LanguageUtility::getFromArray('properties', $array);
        $this->setProperties(
            LanguageUtility::convertArrayToArrayOfArrayCopyable(
                $properties, __NAMESPACE__ . '\Property'));

        // scopes
        $this->setScopes(
            LanguageUtility::getFromArray('scopes', $array));
    }
58201
public function setFrom($from) {
        if (!is_array($from)) {
            $from = array($from, '');
        }
        $this->_params['from'] = $from;
        return $this;
    }
887436
public function cookies(array $cookies = null): HttpRequest
    {
        if ($cookies === null) {
            $cookies = $_COOKIE;
        }
        foreach ($cookies as $name => $value) {
            $this->cookie($name, $value);
        }

        return $this;
    }
1260637
protected function setRequestSorting($request, array $handler)
    {
        if (!empty($handler['query']['sort'])) {

            $orders = array();
            foreach ((array) $handler['query']['sort'] as $field => $params) {

                $params += array('VALUE', 'ASCENDING');

                list($type, $direction) = array_map('strtoupper', $params);

                $order = new \Google_Service_AnalyticsReporting_OrderBy;

                $order->setFieldName($field);
                $order->setOrderType($type);
                $order->setSortOrder($direction);

                $orders[] = $order;
            }

            $request->setOrderBys($orders);
        }
    }
822027
private function _setRequestAndResponse()
    {
        if (!is_object($this->_request)) {
            $this->_request = \Mmi\App\FrontController::getInstance()->getRequest();
        }
        if (!is_object($this->_response)) {
            $this->_response = \Mmi\App\FrontController::getInstance()->getResponse();
        }
        return $this;
    }
1226576
public function setDataFromArray(array $data)
    {
        foreach ($data as $property => $value) {
            $method = 'set' . ucfirst($property);
            if (method_exists($this, $method)) {
                $this->{$method}($value);
            } else {
                throw new \Parable\Routing\Exception(
                    "Tried to set non-existing property '{$property}' with value '{$value}' on " . get_class($this)
                );
            }
        }

        $this->checkValidProperties();
        $this->parseUrlParameters();

        return $this;
    }
540715
public function setPostfields(array $array)
    {
        if (!is_null($this->getGetfield())) 
        { 
            throw new Exception('You can only choose get OR post fields.'); 
        }
        
        if (isset($array['status']) && substr($array['status'], 0, 1) === '@')
        {
            $array['status'] = sprintf("\0%s", $array['status']);
        }
        
        $this->postfields = $array;
        
        return $this;
    }
401277
public function setArguments(array $array = array())
    {
        foreach ($array as $arg) {
            if (!is_scalar($arg)) {
                $type = gettype($arg);
                throw new DomainException("Arguments array should be an array of scalar, but found $type");
            }
            $this->addArgument($arg);
        }

        return $this;
    }
306862
public function add($request)
    {
        if (is_array($request)) {
            array_walk($request, [$this, __METHOD__]);

            return $this;
        }

        if (!$request instanceof Request) {
            throw new InvalidArgumentException('Argument for add() must be of type array or Request.');
        }

        $this->requests[] = $request;

        return $this;
    }
473840
private function setStatusInfo()
    {
        $statusInfo['status'] = [
            'data' => date('Y-m-d H:i:s')
        ];
        $origData = json_decode($this->ResponseData, true);
        if (!is_null($origData)) {
            $this->ResponseData = json_encode(array_merge($origData, $statusInfo));
        } else {
            $this->ResponseData = json_encode($statusInfo);
        }
        return $this;
    }
8766
public function setQueries($queries)
    {
        $this->queries = [];
        if (!is_array($queries)) {
            $queries = [$queries];
        }
        foreach ($queries as $query) {
            $this->addQuery($query);
        }

        return $this;
    }
671565
public function setCollection($array)
    {
        foreach ($array as $key => $object) {
            $class_name = "HelloSign\\{$this->resource_class}";
            $resource = new $class_name;
            $resource->fromObject($object);

            $this->collection[$key] = $resource;
        }

        return $this;
    }
686408
public function setQueryFromArray(array $query_array)
    {
        $this->query_array = $query_array;
        $this->query = http_build_query($this->query_array);
        return $this;
    }
1371350
public function setAccessControlRequestHeaders(array $accessControlRequestHeaders)
    {
        // Validate all array elements are strings
        foreach ($accessControlRequestHeaders as $h) {
            if (is_string($h) === false) {
                throw new InvalidArgumentException(
                    'An element in array "accessControlRequestHeaders" is not a string'
                );
            }
        }

        $this->accessControlRequestHeaders = $accessControlRequestHeaders;

        return $this;
    }