The query string as array.

@return array the query string as array. The array will be empty if
the query string is empty
499990
public function getQueryStringAsArray()
    {
        $queryString = $this->getQueryString();

        if ('' === $queryString) {
            return [];
        }

        $queryStringArray = [];
        parse_str($queryString, $queryStringArray);

        return $queryStringArray;
    }
190621
public function toArray()
    {
        $ret = array();
        foreach (array_keys($this->values) as $key) {
            $ret[$key] = $this->get($key);
        }

        return $ret;
    }
1237449
public function toArray()
    {
        $result = [];

        if (!empty($this->value)) {
            if (!empty($this->details)) {
                $parts = explode('.', $this->value);
                $result['value'] = join('.', array_slice($parts, 0, $this->details));
            } else {
                $result['value'] = $this->value;
            }
        }

        if (!empty($this->alias)) {
            $result['alias'] = $this->alias;
        }

        if (!empty($this->nickname)) {
            $result['nickname'] = $this->nickname;
        }

        if (isset($result['value']) && !isset($result['alias']) && !isset($result['nickname'])) {
            return $result['value'];
        }

        return $result;
    }
968795
public function toArray()
    {
        $data = array();
        $map = array(
            'id' => 'getId',
            'name' => 'getName',
            'source_type' => 'getSourceType',
            'status' => 'getStatus',
            'parameters' => 'getParameters',
            'auth' => 'getAuth',
            'resources' => 'getResources',
            'created_at' => 'getCreatedAt',
            'validate' => 'getValidate'
        );

        foreach ($map as $key => $getter) {
            $data[$key] = $this->$getter();
        }

        foreach (array('auth', 'resources', 'parameters') as $key) {
            if (isset($data[$key])) {
                $data[$key] = json_encode($data[$key]);
            }
        }

        return $data;
    }
498585
public function toArray()
    {
        $result = [
            'browser'   => $this->browser->toArray(),
            'engine'    => $this->engine->toArray(),
            'os'        => $this->os->toArray(),
            'device'    => $this->device->toArray()
        ];

        if (empty($result['browser'])) {
            unset($result['browser']);
        }

        if (empty($result['engine'])) {
            unset($result['engine']);
        }

        if (empty($result['os'])) {
            unset($result['os']);
        }

        if (empty($result['device'])) {
            unset($result['device']);
        }

        if ($this->camouflage) {
            $result['camouflage'] = true;
        }

        return $result;
    }
467559
public function toArray(): array
    {
        return array_filter([
            'field' => 'uuid.type' === $this->field
                ? null
                : $this->field,
            'values' => $this->values,
            'application_type' => self::AT_LEAST_ONE === $this->applicationType
                ? null
                : $this->applicationType,
            'filter_type' => self::TYPE_FIELD === $this->filterType
                ? null
                : $this->filterType,
            'filter_terms' => $this->filterTerms,
        ], function ($element) {
            return
            !(
                is_null($element) ||
                (is_array($element) && empty($element))
            );
        });
    }
1236409
public function toArray() {
        return array_filter(
                array(
                    'id' => $this->id,
                    'label' => $this->label,
                    'type' => $this->type,
                ), function ($val) { return !is_null($val);}
        );
    }
1339381
public function getQueryParametersArray() {
        $queryString = $this->getQueryString();

        if (strlen($queryString) == 0) return array();

        $splitQuery = explode("&", substr($queryString, 1));
        $returnedParams = array();
        foreach ($splitQuery as $param) {
            $splitParam = explode("=", $param);
            if (sizeof($splitParam) == 2) $returnedParams [$splitParam [0]] = $splitParam [1];
        }

        return $returnedParams;

    }
575235
public function toArray()
    {
        $data = array(
            'name' => $this->name,
            'hash' => $this->hash,
            'phash' => $this->phash,
            'mime' => $this->mime,
            'ts' => $this->ts,
            'size' => $this->size,
            'dirs' => $this->dirs,
            'read' => $this->read,
            'write' => $this->write,
            'locked' => $this->locked,
            'tmb' => $this->tmb,
            'alias' => $this->alias,
            'thash' => $this->thash,
            'dim' => $this->dim,
            'volumeid' => $this->volumeid,
            'path' => $this->path,
            'url' => $this->url,
        );

        return array_filter(
            $data,
            function ($var) {
                return !is_null($var);
            }
        );
    }
640600
public function toArray()
    {
        return array(
            'scheme' => $this->scheme->get(),
            'user' => $this->user->get(),
            'pass' => $this->pass->get(),
            'host' => $this->host->get(),
            'port' => $this->port->get(),
            'path' => $this->path->get(),
            'query' => $this->query->get(),
            'fragment' => $this->fragment->get(),
        );
    }
1013719
public function asArray()
    {
        $array = [];

        foreach ($this as $key => $val) {
            if ($val instanceof self) {
                $val = $val->asArray();
            }
            $array[$key] = $val;
        }

        return $array;
    }
372192
public static function getQueryString()
    {
        $querystringsDefault = explode('&', $_SERVER['QUERY_STRING']);
        $querystrings = array();

        foreach ($querystringsDefault as $querystring) {
            $querystring = explode('=', $querystring);
            $querystrings[$querystring[0]] = isset($querystring[1]) ? $querystring[1] : null;
        }

        return $querystrings;
    }
1107211
public function toArray() {
        $arr          = parent::toArray();
        $arr['index'] = $this->index;
        $arr['size']  = $this->size;
        return $arr;
    }
164999
public function getQueryParams() {
    if ($pos = strpos($this->url, '?')) {
      $queryStr = substr($this->url, $pos + 1);
      $params = array();
      parse_str($queryStr, $params);
      return $params;
    }
    return array();
  }
1351901
public function toArray()
    {
        return array(
            'name'   => $this->name,
            'value'  => $this->value,
            'path'   => $this->path,
            'domain' => $this->domain,
            'secure' => $this->isSecure,
            'expiry' => null === $this->expiry ? null : $this->expiry->getTimestamp()
        );
    }
68779
public function toArray() : array
    {
        $result = [];

        if (!empty($this->id)) {
            $result['id'] = $this->id;
        }

        if (!empty($this->link)) {
            $result['links']['about'] = $this->link;
        }

        if (!empty($this->status)) {
            $result['status'] = "{$this->status}";
        }

        if (!empty($this->code)) {
            $result['code'] = "{$this->code}";
        }

        if (!empty($this->title)) {
            $result['title'] = $this->title;
        }

        if (!empty($this->detail)) {
            $result['detail'] = $this->detail;
        }

        if (!empty($this->source)) {
            $result['source'] = $this->source->map(function ($item) {
                return $item;
            });
        }

        if (!empty($this->meta)) {
            $result['meta'] = $this->meta;
        }

        if (!empty($this->exception)) {
            $e = $this->exception;
            if ($e instanceof ExtendedLoggingInformation) {
                $result['exception'] = $e->context();
            } else {
                $result['exception'] = [
                    'exception' => get_class($e),
                    'message' => $e->getMessage(),
                    'stacktrace' => $e->getTrace(),
                ];
            }
        }

        return $result;
    }
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;
	}