Get response as array

@return array
17231
public function toArray()
    {
        $response = [
            'type' => $this->type,
            'className' => $this->className
        ];

        if (count($this->properties)) {
            $response['properties'] = [];

            foreach ($this->properties as $property) {
                $response['properties'][$property->getName()] = $property->toArray();
            }
        }

        return $response;
    }
426751
public function &toArray()
	{
		$arr =	[];

		if ($this->_scheme !== null)
			$arr['scheme']		=	$this->_scheme;

		if ($this->_user !== null)
			$arr['user']		=	$this->_user;

		if ($this->_pass !== null)
			$arr['pass']		=	$this->_pass;

		if ($this->_host !== null)
			$arr['host']		=	$this->_host;

		if ($this->_port !== null)
			$arr['port']		=	$this->_port;

		if ($this->_path !== null)
			$arr['path']		=	$this->_path;

		if ($this->_query !== null)
			$arr['query']		=	$this->_query;

		if ($this->_frag !== null)
			$arr['fragment']	=	$this->_frag;

		return $arr;
	}
1260724
public function __toArray()
    {
        return array(
            'subject' => $this->getSubject(),
            'from' => $this->getFrom(),
            'to' => $this->getTo(),
            'createdat' => $this->getCreatedAt(),
            'in_reply_to' => $this->getInReplyTo() ? $this->getInReplyTo()->getMessageId() : null,
            'message_type' => (string)$this->getMessageType(),
            'body' => $this->getBody(),
        );
    }
219488
public function toArray()
    {
        $response = $this->simpleXmlObject();

        // Converting the SimpleXMLElement Object to array()
        $response = json_encode($response);
        $response = json_decode($response, true);

        // Merging the remaining fields with the response array
        $remainingFields = $this->getRemainingIpnFields();
        $response = array_merge($remainingFields,$response);

        return $response;
    }
819542
public function __toArray()
    {
        $result = [];
        foreach ($this->errors as $idx => $oneError) {
            $result[] = $oneError->__toArray();
        }
        return $result;
    }
233003
public function toArray()
    {
        $dispatch = [];
        $dispatch['status'] = $this->statusCode;

        if ($this->hasMessage()) {
            $dispatch['message'] = $this->message;
        }

        if ($this->hasPayload()) {
            $dispatch = array_merge($dispatch, $this->payload);
        }

        return $dispatch;
    }
584026
public function toArray()
    {
        return [
            $this->id,
            $this->filterName,
            $this->operator,
            serialize($this->value),
        ];
    }
909912
public function toArray()
    {
        return [
            'type'     => get_class($this),
            'value'    => $this->getValue(),
            'children' => array_map(function ($node) {
                return $node->jsonSerialize();
            }, $this->getChildren()),
        ];
    }
226079
public function toArray()
	{
		$this->data = $this->transformer->transformBack($this->data);

		return $this->data;
	}
1252799
public function toArray(): array
    {
        $cookies = [];

        foreach ($this->responseCookies as $key => $cookie) {
            $cookie['expires'] = is_string($cookie['expires']) ?
                        strtotime($cookie['expires']) :
                        (int) $cookie['expires'];

            $cookies[] = ['key' => $key] + $cookie;
        }

        return $cookies;
    }
1209621
public function toArray()
    {
        $result = [];
        foreach ($this->results as $r) {
            $result[] = $r->toArray();
        }
        return $result;
    }
1132034
public function __toArray()
    {
        $result = [];
        if ($this->status !== null) {
            $result['status'] = $this->status;
        }
        if ($this->code !== null) {
            $result['code'] = $this->code;
        }
        if ($this->title !== null) {
            $result['title'] = $this->title;
        }
        return $result;
    }
1074498
function toArray()
    {
        $parse = array(
            'scheme'    => $this->getScheme(),
            'user_info' => $this->getUserInfo(),
            'host'      => $this->getHost(),
            'port'      => $this->getPort(),
            'path'      => $this->getPath(),
            'query'     => $this->getQuery()->toString(),
            'fragment'  => $this->getFragment(),
            
            'authority' => $this->getAuthority(),
        );

        return $parse;
    }
1353299
public function get_array() {
	$response = array();
	
	// links
	if ($this->links) {
		$response['links'] = $this->links;
	}
	
	// primary data
	$response['data'] = array(
		'type' => $this->primary_type,
	);
	if ($this->primary_id) {
		$response['data']['id'] = $this->primary_id;
	}
	if ($this->primary_attributes) {
		$response['data']['attributes'] = $this->primary_attributes;
	}
	if ($this->primary_relationships) {
		$response['data']['relationships'] = $this->primary_relationships;
	}
	if ($this->primary_links) {
		$response['data']['links'] = $this->primary_links;
	}
	if ($this->primary_meta_data) {
		$response['data']['meta'] = $this->primary_meta_data;
	}
	
	// included resources
	if ($this->included_data) {
		$response['included'] = array_values($this->included_data);
	}
	
	// meta data
	if ($this->meta_data) {
		$response['meta'] = $this->meta_data;
	}
	
	return $response;
}
618343
public function toArray()
    {
        return array(
            'name' => $this->_name,
            'type' => $this->_datatype,
            'length' => $this->_length,
            'notnull' => $this->_notnull,
            'default' => $this->_default,
            'autoincrement' => $this->_autoIncrement,
            'comment' => $this->_comment,
        );
    }
963322
public function toArray(): array
    {
        return [
            'name' => $this->name,
            'text' => $this->text,
            'style' => $this->style,
            'type' => $this->type,
            'value' => $this->value,
            'confirm' => $this->confirm ? $this->confirm->toArray() : null,
        ];
    }
1126217
public function toArray(): array
    {
        $payload = [
            'code' => $this->getCode()
        ];

        if (! empty($this->getMessage())) {
            $payload['message'] = $this->getMessage();
        }

        if (! empty($this->getError())) {
            $payload['error'] = $this->getError();
        }

        if (! empty($this->getData())) {
            $payload['data'] = $this->getData();
        }

        if (! empty($this->getOptions())) {
            $payload += $this->getOptions();
        }

        return $payload;
    }