Generates response
@return array
18050
public function respond()
    {
        $response = array();

        foreach ($this->queue as $object) {
            $response[] = $object->render();
        }

        return array('ajaxcom' => $response);
    }
469672
public function handler(): Response
    {
        $response = [];
        foreach (Extension::all(['createdAt' => 'ASC']) as $extension) {
            $response[] = [
                'vendor' => $extension->getVendor(),
                'package' => $extension->getPackage(),
                'version' => $extension->getVersion(),
                'description' => $extension->getDescription(),
                'isActivated' => $extension->isActivated()
            ];
        }
        return response($response);
    }
445018
protected function getUserResponse()
    {
        $response = new $this->options['user_response_class']();
        if ($response instanceof PathUserResponse) {
            $response->setPaths($this->paths);
        }

        return $response;
    }
878823
public function getResponse()
    {
        $this->addParameters()->addHeaders();
        $this->options[CURLOPT_RETURNTRANSFER] = true;

        $this->meta = call_user_func($this->map, $this->options);

        return $this->meta['response'];
    }
1194476
protected function getResponse()
    {
        if ($this->response === null) {
            $this->response = $this->client->send($this->request);
        }

        return $this->response;
    }
159500
public function generate()
    {
        $output = [];

        $fields = array_keys(get_object_vars($this));

        foreach ($fields as $field) {
            if (($value = $this->generateValue($this->$field)) !== null) {
                $output[$field] = $value;
            }
        }

        return $output;
    }
1285449
protected function response()
    {
        if ( $this->responseObject ) {
            return $this->responseObject;
        }
        $this->responseObject = new Response;

        return $this->responseObject;
    }
844508
public function handler(): Response
    {
        $response = [];
        foreach (Bulletin::all() as $bulletin) {
            $response[] = [
                'id' => $bulletin->getId(),
                'createdAt' => $bulletin->getCreatedAt()->getTimestamp(),
                'title' => $bulletin->getTitle(),
                'abstract' => $bulletin->getAbstract(),
                'isDraft' => $bulletin->isDraft(),
                'statistics' => $bulletin->getStatistics()
            ];
        }
        return response($response);
    }
744818
final public function generateRequest(): array
    {
        $headers = getallheaders();
        $http_or_https = isset($_SERVER['HTTPS']) ? 'https' : 'http';

        // Build Context Stub
        $SERVER_PROTOCOL = $_SERVER['SERVER_PROTOCOL'] ?? '';
        $remote_address = $_SERVER['REMOTE_ADDR'] ?? '';
        if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) === true) {
            $remote_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
        }

        return [
            'http_version' => substr($SERVER_PROTOCOL, strpos($SERVER_PROTOCOL, '/')),
            'method'       => $_SERVER['REQUEST_METHOD'] ?? 'cli',
            'socket'       => [
                'remote_address' => $remote_address,
                'encrypted'      => isset($_SERVER['HTTPS'])
            ],
            'response' => $this->contexts['response'],
            'url'          => [
                'protocol' => $http_or_https,
                'hostname' => $_SERVER['SERVER_NAME'] ?? '',
                'port'     => $_SERVER['SERVER_PORT'] ?? '',
                'pathname' => $_SERVER['SCRIPT_NAME'] ?? '',
                'search'   => '?' . (($_SERVER['QUERY_STRING'] ?? '') ?? ''),
                'full' => isset($_SERVER['HTTP_HOST']) ? $http_or_https . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] : '',
            ],
            'headers' => [
                'user-agent' => $headers['User-Agent'] ?? '',
                'cookie'     => $this->getCookieHeader($headers['Cookie'] ?? ''),
            ],
            'env' => (object)$this->getEnv(),
            'cookies' => (object)$this->getCookies(),
        ];
    }
525109
public function getResponse()
    {
        $response = redirect()->to($this->getRedirectUrl());
        $response->withInput($this->request->input());
        $response->withErrors($this->getErrors(), 'default');
        $response->setCharset(config('app.charset', 'UTF-8'));

        return $response;
    }
862603
private function prepareResponse() {
    if (is_null($this->response)) {
      return false;
    }

    $response = "";

    $this->response_header_block = $this->extractHeadersFromResponse();
    if ($this->tryGetOption(CURLOPT_HEADER, $value) && $value) {
      $response .= $this->response_header_block;
    }
    $response .= $this->response->getContent();

    return $response;
  }
5815
public function send()
    {
        $responses = new \StdClass();

        foreach ($this->resources as $key => $promise) {
            $response = $promise->wait();
            $responses->{$key} = $this->parse($response->getBody());
        }

        return $responses;
    }
1162217
public function generateResponse()
    {
        $uniqueId = $this->isWPFNotification() ? 'wpf_unique_id' : 'unique_id';

        $structure = [
            'notification_echo' => [
                $uniqueId => $this->unique_id
            ]
        ];

        $builder = new \Genesis\Builder('xml');
        $builder->parseStructure($structure);

        return $builder->getDocument();
    }
856796
public function generateRawData()
    {
        $rawData = ['id' => $this->getId()];
        if ($this->getCreatedAt()) {
            $rawData['created_at'] = $this->getCreatedAt();
        }
        if ($this->getStatusDescription() || $this->getStatusCode()) {
            $rawData['status'] = $this->getStatus();
        }

        return $rawData;
    }
1094708
private function formatResponse()
    {
        $return = array();

        // Method
        if (isset($this->state['method'])) {
            $return['method'] = $this->state['method'];
        }

        // Request
        if (!empty($this->state['request'])) {
            $return['request'] = $this->state['request'];
        }

        // Response
        if (!empty($this->state['response'])) {
            $return['response'] = $this->state['response'];
        }

        return $return;
    }
466472
public function getResponse() {

		$params = array();
		foreach ($this->parameters as $var => $value)
		{
			if(is_array($value))
			{
				foreach($value as $v)
				{
					$params[] = $var.'='.$this->__customUrlEncode($v);
				}
			}
			else
			{
				$params[] = $var.'='.$this->__customUrlEncode($value);
			}
		}

		sort($params, SORT_STRING);

		// must be in format 'Sun, 06 Nov 1994 08:49:37 GMT'
		$date = gmdate('D, d M Y H:i:s e');

		$query = implode('&', $params);

		$headers = array();
		$headers[] = 'Date: '.$date;
		$headers[] = 'Host: '.$this->ses->getHost();

		$auth = 'AWS3-HTTPS AWSAccessKeyId='.$this->ses->getAccessKey();
		$auth .= ',Algorithm=HmacSHA256,Signature='.$this->__getSignature($date);
		$headers[] = 'X-Amzn-Authorization: '.$auth;

		$url = 'https://'.$this->ses->getHost().'/';

		// Basic setup
		$curl = curl_init();
		curl_setopt($curl, CURLOPT_USERAGENT, 'SimpleEmailService/php');

		curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, ($this->ses->verifyHost() ? 1 : 0));
		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, ($this->ses->verifyPeer() ? 1 : 0));

		// Request types
		switch ($this->verb) {
			case 'GET':
				$url .= '?'.$query;
				break;
			case 'POST':
				curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $this->verb);
				curl_setopt($curl, CURLOPT_POSTFIELDS, $query);
				$headers[] = 'Content-Type: application/x-www-form-urlencoded';
			break;
			case 'DELETE':
				$url .= '?'.$query;
				curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
			break;
			default: break;
		}
		curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
		curl_setopt($curl, CURLOPT_HEADER, false);

		curl_setopt($curl, CURLOPT_URL, $url);
		curl_setopt($curl, CURLOPT_RETURNTRANSFER, false);
		curl_setopt($curl, CURLOPT_WRITEFUNCTION, array(&$this, '__responseWriteCallback'));
		curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);

		// Execute, grab errors
		if (curl_exec($curl)) {
			$this->response->code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
		} else {
			$this->response->error = array(
				'curl' => true,
				'code' => curl_errno($curl),
				'message' => curl_error($curl),
				'resource' => $this->resource
			);
		}

		@curl_close($curl);

		// Parse body into XML
		if ($this->response->error === false && isset($this->response->body)) {
			$this->response->body = simplexml_load_string($this->response->body);

			// Grab SES errors
			if (!in_array($this->response->code, array(200, 201, 202, 204))
				&& isset($this->response->body->Error)) {
				$error = $this->response->body->Error;
				$output = array();
				$output['curl'] = false;
				$output['Error'] = array();
				$output['Error']['Type'] = (string)$error->Type;
				$output['Error']['Code'] = (string)$error->Code;
				$output['Error']['Message'] = (string)$error->Message;
				$output['RequestId'] = (string)$this->response->body->RequestId;

				$this->response->error = $output;
				unset($this->response->body);
			}
		}

		return $this->response;
	}
452284
public function getResponseStrings()
    {
        $response = [];
        foreach (array_keys($this->pending) as $tableName) {
            $message = isset($this->titles[$tableName]) ? $this->titles[$tableName] . ' ' : '';
            if (!empty($this->messages[$tableName])) {
                $message .= implode(', ', $this->messages[$tableName]);
            }
            $response[$tableName] = $message;
        }
        ksort($response);

        return $response;
    }