will convert the intermediate data result data into ActiveModel compatible result object

@return \stdClass
@throws HTTPException
513948
protected function formatJSON()
    {
        $result = new \stdClass;

        if ($this->outputMode == self::MODE_ERROR) {
            $this->formatFailure($result);
        } else {
            $this->formatSuccess($result);
        }

        // only include if it has valid data
        if ($this->meta) {
            $result->meta = $this->meta;
        }

        return $result;
    }
988780
public function jsonSerialize(): stdClass
    {
        $object = (object)object_get_properties($this, $this instanceof DynamicEntity);

        /** @var Event\ToJson $event */
        $event = $this->dispatchEvent(new Event\ToJson($this, $object));
        $data = i\type_check($event->getPayload(), stdClass::class, new UnexpectedValueException());

        return $data;
    }
901963
public function getResult()
    {
        $this->sortable();
        $query = http_build_query($this->attributes);
        $query = urldecode($query);
        $result = call_user_func($this->hashType, $query);

        return $this->isUpper ? strtoupper($result) : $result;
    }
1350919
public function getModel()
    {
        if ($this->_model === null) {
            $this->_model = Nav::findOne($this->navId);
            
            if (empty($this->_model)) {
                throw new Exception('The model active record could not be found for the corresponding nav item. Maybe you have inconsistent Database data.');
            }
        }
        
        return $this->_model;
    }
1174711
public function getRedirectData()
    {
        // Build the post data as expected by Postfinance.
        $params = $this->getData();
        $postData = array();
        foreach ($params as $key => $value) {
            $postData[$key] = $value;
        }

        $postData['SHASIGN'] = Helper::createShaHash(
            $postData,
            $this->getRequest()->getShaIn(),
            $this->getRequest()->getHashingMethod()
        );

        return $postData;
    }
1127603
public function getCallbackResult()
    {
        $class = $this->requestBag->getClassData()['class'];
        if (is_string($class)) {
            $this->requestBag->setClassInstance(new $class);
        } else {
            $this->requestBag->setClassInstance($class);
        }

        // create CallbackResult instance
        $cr = new CallbackResult();

        $env = 'production';
        if ($this->requestBag->getApiConfig()->get('Environment', 'production') == 'development') {
            $cr->setEnvToDevelopment();
            $env = 'development';
        }

        // attach some metadata
        $cr->attachDebugHeader('Class', $class);
        $cr->attachDebugHeader('ClassVersion', $this->requestBag->getClassData()['version']);
        $cr->attachDebugHeader('Method', strtoupper($this->httpRequest()->getRequestMethod()));


        if (!$this->requestBag->getMethodData()) {
            // if no method matched the request
            $cr->setHeaderResponse(404);
            $cr->setErrorResponse('No service matched the request.');

            return $cr;
        }

        // check rate limit
        try {
            $rateControl = RateControl::isWithinRateLimits($this->requestBag, $cr);
            if (!$rateControl) {
                $cr->setHeaderResponse(429);
                $cr->setErrorResponse('Rate control limit reached.');

                return $cr;
            }
        } catch (\Exception $e) {
            throw new RestException('Rate control verification failed. ' . $e->getMessage());
        }

        // verify access role
        try {
            $hasAccess = Security::hasAccess($this->requestBag);
            if (!$hasAccess) {
                $cr->setHeaderResponse(403);
                $cr->setErrorResponse('You don\'t have the required access level.');
                $cr->attachDebugHeader('RequestedRole', $this->requestBag->getMethodData()['role']);

                return $cr;
            }
        } catch (\Exception $e) {
            throw new RestException('Access role verification failed. ' . $e->getMessage());
        }

        // verify cache
        try {
            $cachedResult = Cache::getFromCache($this->requestBag);
        } catch (\Exception $e) {
            throw new RestException('Reading result from cache failed. ' . $e->getMessage());
        }

        // finalize output
        if ($cachedResult) {
            $cr->setData($cachedResult);
            $cr->attachDebugHeader('Cache', 'HIT');
        } else {
            try {
                // Check if we have a Middleware set up
                $middleware = $this->requestBag->getApiConfig()->get('Middleware');
                if ($middleware) {
                    $middleware = new $middleware;
                    if (!$this->isInstanceOf($middleware, MiddlewareInterface::class)) {
                        throw new RestException('Your custom Rest middleware must implement `' . MiddlewareInterface::class . '`');
                    }
                    $this->middleware = $middleware;
                }

                if ($this->middleware) {
                    $result = $this->middleware->getResult($this->requestBag);
                } else {
                    $result = call_user_func_array([
                        $this->requestBag->getClassInstance(),
                        $this->requestBag->getMethodData()['method']
                    ], $this->requestBag->getMethodParameters());
                }

                // check if method has custom headers set
                $cr->setHeaderResponse($this->requestBag->getMethodData()['header']['status']['success']);
                $cr->attachDebugHeader('Cache', 'MISS');

                // add result to output
                $cr->setData($result);

                // check if we need to attach the cache headers
                if ($this->requestBag->getMethodData()['header']['cache']['expires'] > 0) {
                    $cr->setExpiresIn($this->requestBag->getMethodData()['header']['cache']['expires']);
                }

                // cache the result
                Cache::saveResult($this->requestBag, $result);

            } catch (RestErrorException $re) {
                // check if method has custom headers set
                $cr->setHeaderResponse($statusCode = $re->getResponseCode(),
                    $this->requestBag->getMethodData()['header']['status']['errorMessage']);

                // check if a custom http response code is set


                $cr->setErrorResponse($re->getErrorMessage(), $re->getErrorDescription(), $re->getErrorCode());
                $errors = $re->getErrors();
                foreach ($errors as $e) {
                    $cr->addErrorMessage($e);
                }

                if ($env == 'development') {
                    $cr->addDebugMessage([
                        'file'   => $re->getFile(),
                        'line'   => $re->getLine(),
                        'traces' => explode('#', $re->getTraceAsString())
                    ]);
                }
            } catch (\Exception $e) {
                // check if method has custom headers set
                $cr->setHeaderResponse($this->requestBag->getMethodData()['header']['status']['error'],
                    $this->requestBag->getMethodData()['header']['status']['errorMessage']);

                $cr->setErrorResponse('There has been an error processing the request.');
                if ($env == 'development') {
                    $cr->addErrorMessage(['message' => $e->getMessage()]);
                    $cr->addDebugMessage([
                        'file'   => $e->getFile(),
                        'line'   => $e->getLine(),
                        'traces' => explode('#', $e->getTraceAsString())
                    ]);
                }
            }
        }

        return $cr;
    }
66221
public function toArray()
	{
		$result = parent::toArray();

		if (isset($result['suspended']))
		{
			$result['suspended'] = $this->getSuspendedAttribute($result['suspended']);
		}
		if (isset($result['banned']))
		{
			$result['banned'] = $this->getBannedAttribute($result['banned']);
		}
		if (isset($result['last_attempt_at']) and $result['last_attempt_at'] instanceof DateTime)
		{
			$result['last_attempt_at'] = $result['last_attempt_at']->format('Y-m-d H:i:s');
		}
		if (isset($result['suspended_at']) and $result['suspended_at'] instanceof DateTime)
		{
			$result['suspended_at'] = $result['suspended_at']->format('Y-m-d H:i:s');
		}

		return $result;
	}
362584
public function parseData()
    {
        $headers = $this->getHeaders();

        if (!in_array($this->httpRequest->getMethod(), ['PUT', 'POST'])) {
            return $this->emit('end');
        }

        $this->httpRequest->on('data', function($data) use ($headers, &$dataResult) {
            $dataResult .= $data;

            if (isset($headers["content-length"])) {
                if (strlen($dataResult) == $headers["content-length"][0]) {
                    $this->httpRequest->close();
                }
            } else {
                $this->httpRequest->close();
            }
        });

        $this->httpRequest->on('end', function() use (&$dataResult) {
            $this->onEnd($dataResult);
        });
    }
587542
public function getResultObject()
    {
        if (!isset($this->_dataObject) && !empty($this->result)) {
            $this->_dataObject = unserialize($this->result);
        } elseif (!isset($this->_dataObject)) {
            $this->_dataObject = new Result;
        }
        $this->_dataObject->model = $this;

        return $this->_dataObject;
    }
532423
public function parseData(): self
    {
        if (!is_array($this->raw_data)) {
            throw new RuntimeException('Response must be an array');
        }

        if (!array_key_exists('status', $this->raw_data)) {
            $this->result_code = ResponseInterface::RESULT_DATA_MALFORMED;

            return $this;
        }

        $this->result_code = $this->raw_data['status'];

        // ios > 7 receipt validation
        if ($this->isIOS7StyleReceipt()) {
            $this->parseIOS7StyleReceipt();
        } elseif ($this->isIOS6StyleReceipt()) {
            $this->parseIOS6StyleReceipt();
        }

        return $this;
    }
1006169
public function getResult()

    {
        $bodyParams = $this->attributes;


        $response = $this->_connection->post(
            Urls::URL_TRAVERSAL,
            $this->getConnection()->json_encode_wrapper($bodyParams)
        );

        return $response->getJson();
    }
866844
public function execute()
    {
        $id = $this->getRequest()->getParam('template_id');

        if ($id) {
            $model = $this->templateRepository->getById($id);

            if (!$model->getId()) {
                $this->messageManager->addErrorMessage(__('This post no longer exists.'));
                /** \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
                $resultRedirect = $this->resultRedirectFactory->create();

                return $resultRedirect->setPath('*/*/');
            }
        } else {
            $model = $this->pdfgeneratorFactory->create();
        }

        /** @var Session $data */
        $data = $this->session->getFormData(true);

        if (!empty($data)) {
            $model->setData($data);
        }

        $this->coreRegistry->register('pdfgenerator_template', $model);

        $resultPage = $this->_initAction();
        $resultPage->addBreadcrumb(
            $id ? __('Edit Template') : __('New Template'),
            $id ? __('Edit Template') : __('New Template')
        );

        $resultPage->getConfig()->getTitle()->prepend(__('Template'));
        $resultPage->getConfig()->getTitle()
            ->prepend(
                $model->getData('template_id') ? __('Template ') . $model->getTemplateName() : __('New Template')
            );

        return $resultPage;
    }
230596
public function dataFromObject()
    {
        $obj             = $this->proto();
        $metadata        = $obj->metadata();
        $adminMetadata   = isset($metadata['admin']) ? $metadata['admin'] : null;
        $collectionIdent = $this->collectionIdent();
        if (!$collectionIdent) {
            $collectionIdent = isset($adminMetadata['default_list']) ? $adminMetadata['default_list'] : '';
        }

        if (isset($adminMetadata['lists'][$collectionIdent])) {
            return $adminMetadata['lists'][$collectionIdent];
        } else {
            return [];
        }
    }
581608
final public function to_record() {
        $data = new stdClass();
        $properties = static::properties_definition();
        foreach ($properties as $property => $definition) {
            $data->$property = $this->raw_get($property);
        }
        return $data;
    }
70364
public function getDataModel()
    {
        $dataModel = array();
        $model     = $this->config->getDataModel();

        foreach ($this->getEditFieldsArrays() as $name => $options) {
            //if this is a key, set it to 0
            if ($options['type'] === 'key') {
                $dataModel[$name] = 0;
            } else {
                //if this is a collection, convert it to an array
                if (is_a($model->$name, 'Illuminate\Database\Eloquent\Collection')) {
                    $dataModel[$name] = $model->$name->toArray();
                } else {
                    $dataModel[$name] = isset($options['value']) ? $options['value'] : null;
                }
            }
        }

        return $dataModel;
    }
352285
protected function _convertAdditionalData()
    {
        $details = @unserialize($this->getInfo()->getAdditionalData());

        if (is_array($details)) {
            $this->_billerCode = isset($details['biller_code']) ? (string) $details['biller_code'] : '';
            $this->_ref = isset($details['ref']) ? (string) $details['ref'] : '';
        } else {
            $this->_billerCode = '';
            $this->_ref = '';
        }

        return $this;
    }
300528
public function getData()
    {
        if ($this->getTestMode()) {
            $this->validate('testKey');
        } else {
            $this->validate('signKey');
        }

        $result = [];
        $vars = array_merge($this->httpRequest->query->all(), $this->httpRequest->request->all());
        foreach ($vars as $key => $parameter) {
            if (strpos($key, 'ik_') === 0) {
                $result[$key] = $parameter;
            }
        }

        return $result;
    }