Get response

If no response has been set, this method will
set and return a default response, if any such
value is available

@see getDefaultResponse()

@return ResponseFactory|null response or null if none response has been set
421330
public function getResponse(): ?ResponseFactory
    {
        if (!$this->hasResponse()) {
            $this->setResponse($this->getDefaultResponse());
        }
        return $this->response;
    }
58254
public function getResponse(): ResponseInterface
    {
        if (is_null($this->response)) {
            if (method_exists($this, 'resolve')) {
                $this->setResponse($this->resolve(Response::class)->load());
            } else {
                $response = new Response();
                $this->setResponse($response->load());
            }
        }

        return $this->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'];
    }
1349776
protected function getResponder(): Responder
    {
        if ($this->responder === null) {
            $this->responder = new HttpResponder;
        }

        return $this->responder;
    }
11660
protected static function defaultCreateResponse(
        string $index,
        UriInterface $requestUri,
        CrudInterface $crud,
        JsonSchemasInterface $jsonSchemas,
        EncoderInterface $encoder
    ): ResponseInterface {
        $model = $crud->read($index);
        assert($model !== null && !($model instanceof PaginatedDataInterface));

        $responses = static::defaultCreateResponses($requestUri, $encoder);
        $fullUrl   = static::defaultGetResourceUrl($model, $requestUri, $jsonSchemas);
        $response  = $responses->getCreatedResponse($model, $fullUrl);

        return $response;
    }
136845
public function getResponse()
    {
        if ($this->response === null and $this->isExecuted()) {
            $this->response = Response::forge($this);
        }

        return $this->response;
    }
178933
public function getResponse() {
		$l = $this->action->layout('output');
		
		switch($l) {
			case 'object':
			case 'object_list':
			case 'hash':
			case 'hash_list':
				return $this->envelope->response->{$this->action->getNamespace('output')};
				
			default:
				return $this->envelope->response;
		}
	}
1070334
public function setDefaultAction()
    {
        $params     = $this->params();
        $locator    = $this->getServiceLocator();
        $model      = $locator->get( 'Grid\User\Model\User\Group\Model' );
        $group      = $model->find( $params->fromRoute( 'id' ) );

        if ( empty( $group ) )
        {
            $this->getResponse()
                 ->setStatusCode( 404 );

            return;
        }

        if ( $group->predefined )
        {
            $this->getResponse()
                 ->setStatusCode( 403 );

            return;
        }

        if ( ! $this->getPermissionsModel()
                    ->isAllowed( $group, 'edit' ) )
        {
            $this->getResponse()
                 ->setStatusCode( 403 );

            return;
        }

        if ( ! $group->default )
        {
            $group->default = true;

            if ( $group->save() )
            {
                $this->messenger()
                     ->add( 'user.form.group.success',
                            'user', Message::LEVEL_INFO );
            }
            else
            {
                $this->messenger()
                     ->add( 'user.form.group.failed',
                            'user', Message::LEVEL_ERROR );
            }
        }

        return $this->redirect()
                    ->toRoute( 'Grid\User\GroupAdmin\List', array(
                        'locale' => (string) $this->locale(),
                    ) );
    }
199340
public function getParsedResponse()
    {
        // We first get an array representing the response
        $rawData = $this->bodyToArray();

        // If we have a wrapper response object initialized in the current ActionResponse object, then we return it.
        if ($this->responseWrapper instanceof Wrapper\ResponseWrapperInterface) {
            $this->responseWrapper->init($rawData, $this);
            return $this->responseWrapper;
        }
        return $rawData;
    }
407127
public function getResponse() {
		if($this->response)
			return $this->response;
		else
			return new \Asgard\Http\Response($this->code);
	}
347062
public function get_status() {
		// If a status is already set
		if ( isset($this->response->status) && !is_null($this->response->status) ) {
			return $this->response->status;
		}
		// If the status code has a corresponding message in our config
		elseif ( array_key_exists($this->response->code(), $this->config['rest']['status_codes']) ) {
			return $this->config['rest']['status_codes'][$this->response->code()];
		}
		// If there's a default
		elseif ( isset($this->config['rest']['defaults']['status']) ) {
			return $this->config['rest']['defaults']['status'];
		}
		else {
			return 'NULL';
		}
	}
962723
public function createServiceFactory()
    {
        $factory = ServiceFactory::create();
        $service = $factory->getService($this->payment, ServiceFactory::INTENT_PAYMENT);

        try {
            $serviceResponse = $service->initiate($this->getGatewayData());
        } catch (Exception $ex) {
            // error out when an exception occurs
            user_error($ex->getMessage(), E_USER_WARNING);
            return null;
        }

        return $serviceResponse;
    }
488575
public function getJsonResponse()
    {
        $json = json_decode($this->httpResponse);
        if (is_null($json) && json_last_error() != JSON_ERROR_NONE) {
            return null; // decode error
        } else {
            return is_object($json) ? $json : null;
        }
    }
398068
public function getResponse()
    {
        if(!$this->_response instanceof ControllerResponseInterface)
        {
            //Setup the response
            $this->_response->request = $this->getRequest();
            $this->_response->user    = $this->getUser();

            $this->_response = $this->getObject('lib:controller.response', ObjectConfig::unbox($this->_response));

            if(!$this->_response instanceof ControllerResponseInterface)
            {
                throw new \UnexpectedValueException(
                    'Response: '.get_class($this->_response).' does not implement ControllerResponseInterface'
                );
            }
        }

        return $this->_response;
    }
1197844
public function defaultAction()
    {
        // Check current user authorization
        if (null !== $response = $this->checkAuth(AdminResources::MODULE, Team::getModuleCode(),
                AccessManager::VIEW)
        ) {
            return $response;
        }

        return $this->getListRenderTemplate();
    }
1307444
public function & GetResponse () {
		if ($this->response === NULL) {
			$responseClass = $this->responseClass;
			$this->response = $responseClass::CreateInstance();
		}
		return $this->response;
	}
1115902
public function getResponse()
	{
	    $name = 'web.response';
	    if (!Ioc::has($name)) {
	        Ioc::setShared($name, function () {
	            //$headers = new Headers(['Content-Type' => 'text/html; charset=UTF-8']);
	            $response = new Response(200);
	            return $response->withProtocolVersion(Config::getCommon('http.version'));
	        });
	    }
	    
	    return Ioc::get($name);
	}