Converts the Response object body to an array

@return array
3433
public function bodyToArray()
    {
        // Getting response content
        $xmlContent = $this->response->getContent();

        // Wrapping it into a Xml reader object and convert it to array
        $xmlReader = new Xml();
        return $xmlReader->fromString($xmlContent);
    }
1074733
public function toArray()
    {
        return array_merge($this->wrappedObject->toArray(), [
            'created_at'  => $this->created_at(),
            'updated_at'  => $this->updated_at(),
            'status_name' => $this->human_status(),
            'tags'        => $this->tags(),
        ]);
    }
325816
protected function prepareBody()
    {
        $body = $this->body;

        $result = $body;

        if ($this->isJson() && (is_array($body) || is_object($body))) {
            $result = json_encode(\pwf\helpers\ArrayHelper::toArray($body));
        }

        return $result;
    }
1109871
public function toArray()
    {
        return [
            'id' => $this->getId(),
            'recipients' => $this->getRecipients(),
            'from' => $this->getFrom(),
            'body' => $this->getBody(),
            'data' => $this->getData(),
            'template_id' => $this->getTemplateId(),
            'status' => $this->getStatus(),
        ];
    }
1300293
public function toArray()
    {
        $response = $this->simpleXmlObject();
        
        // Converting the SimpleXMLElement Object to array()
        $response = json_encode($response);
        
        return (json_decode($response, true));
    }
328655
public function toArray(): array
    {
        return [
            'name' => $this->name,
            'method' => $this->method,
            'url' => $this->url,
            'model' => $this->model,
            'view' => $this->view,
            'controller' => $this->controller,
            'action' => $this->action,
            'default' => $this->default,
            'param' => $this->param,
            'callback' => $this->callback
        ];
    }
1078957
public function toArray()
    {
        return [
            'text' => $this->getText($this->getModel()),
            'attributes' => $this->getConditionAttributes($this->model)->htmlAttributesToString(),
            'url' => $this->getUrl($this->getModel()),
            'position' => $this->getPosition(),
            'icon' => $this->getIcon(),
            'hideText' => $this->hideText,
        ];
    }
452154
private function parse($body)
    {
        $result = array();
        $data = json_decode($body);

        $response = is_array($data->response) ? new \stdClass : $data->response;
        if (null == $response) {
            $response = $data;
        }
        $response->errors = $data->errors;
        $response->test = isset($data->test) ? $data->test : $response->test;

        if ($data->successful == true) {
            if ((isset($response->authorized)
                && $response->authorized == true)
                || (isset($response->id)
                && $response->id !== null)
            ) {
                $response->authorization_id = isset($response->id)
                    ? $response->id
                    : $response->token;
            } else {
                $response->authorization_id = null;
            }

            $response->success = true;
        } else {
            $response->success = false;
            $response->authorization_id = null;
        }

        $response->message = isset($response->message) ? $response->message : $data->errors;

        return (array) $response;

    }
785755
public function toArray()
    {
        $this->dataType('array');
        
        $this->execute();
        
        if ($this->def['savePath']) {
            return $this->save();
        } elseif ($this->def['verbose']) {
            return $this->getVerboseResponse();
        }
        
        return $this->getError() ? : json_decode($this->responseText, true);
    }
1210815
public function extractResponseHeadersAndBody()
    {
        $parts = explode("\r\n\r\n", $this->rawResponse);
        $rawBody = array_pop($parts);
        $rawHeaders = implode("\r\n\r\n", $parts);

        return [trim($rawHeaders), trim($rawBody)];
    }
1343556
public function toArray()
    {
        return array_merge($this->wrappedObject->toArray(), [
            'created_at'  => $this->created_at(),
            'updated_at'  => $this->updated_at(),
            'verified_at' => $this->verified_at(),
        ]);
    }
1088770
public function toArray()
    {
        $result = [];
        $result['id']            = $this->id;
        $result['toUserName']    = $this->toUserName;
        $result['fromUserName']  = $this->fromUserName;
        $result['createTime']    = $this->createTime;
        $result['msgType']       = $this->msgType;
        return $result;
    }
598591
public function toArray()
    {
        $params = array('secret' => $this->secret, 'response' => $this->response);

        if (!is_null($this->remoteIp)) {
            $params['remoteip'] = $this->remoteIp;
        }

        if (!is_null($this->version)) {
            $params['version'] = $this->version;
        }

        return $params;
    }
1249719
public function toArray()
    {
        return [
            'name'                      => $this->name,
            'label'                     => $this->label,
            'description'               => $this->description,
            'sandboxed'                 => $this->sandboxed,
            'supports_inline_execution' => $this->supportsInlineExecution,
        ];
    }
86129
public function getVerboseResponse() 
    {
        $this->execute();
        
        if ($this->error) {
            return $this->error;
        }
        
        $contentType = $this->getContentType();
        
        $body = ($this->def['dataType'] == 'array' || strpos($contentType, 'json') !== false) ? static::data2json($this->responseText) : $this->responseText;
        
        return [
            'status'    => $this->status,
            'body'      => $body, 
            'info'      => $this->responseInfo,
            'header'    => $this->responseHeaders,
            'request_header'    => $this->getRequestHeaders(),
            'content_type'      => $contentType
        ];
    }
970231
public function __toArray()
    {
        $datas = [
            'id'   => (string)$this->id,
            'type' => (string)$this->type
        ];
        if ($this->attributes !== null) {
            $datas['attributes'] = $this->attributes->__toArray();
        }
        return $datas;
    }
1094624
public function toArray()
    {
        $this->data->id = $this->id;

        return json_decode(json_encode($this->data), true);
    }