Serialize to query string

@return string
550249
public function toString()
    {
        $params = $this->toArray();
        $filename = $params['filename'];
        $extension = $params['extension'];
        unset($params['filename'], $params['extension']);

        ksort($params);
        $mapping = array_flip($this->argMapping);
        $defaults = $this->argDefaults;

        $nameArray = array();
        foreach($params as $key => $value){
            //remove value if as same as default setting
            if($value !== null && $value !== $defaults[$key]){
                $nameArray[$mapping[$key]] = $mapping[$key] . '_' . $value;
            }
        }
        $nameArray = $nameArray ? ',' . implode(',', $nameArray) : '';
        return $filename . $nameArray . '.' . $extension;
    }
1017672
public function serialize()
    {
        $result = [
            'code' => $this->getCode(),
            'message' => $this->getMessage(),
            'errors' => $this->getErrors()
        ];

        $result['data'] = $this->getVariables();

        if ($result['data'] instanceof Traversable) {
            $result['data'] = ArrayUtils::iteratorToArray($result['data']);
        }

        if (null !== $this->jsonpCallback) {
            return $this->jsonpCallback . '(' . Json::encode($result) . ');';
        }

        return Json::encode($result);
    }
1233098
public function serialize()
    {
        $serialized = new \stdClass();
        $serialized->username = $this->_login;
        $serialized->commonname = trim($this->_firstname . ' ' . $this->_lastname);

        return json_encode($serialized);
    }
1006637
public function getURLQuery()
    {
        $qstr = '?';

        $params = $this->getParametersArray();

        $paramCount = count($params);
        $i = 0;
        foreach ($params as $key => $value) {
            if ($value === null) {
                continue;
            }

            $qstr .= $key . '=' . rawurlencode($value);

            if ($i < $paramCount - 1) {
                $qstr .= '&';
            }

            $i++;
        }

        return $qstr;
    }
312539
public function toString()
    {
        $this->parts = array();
        $this->params = array();
        $this->assemble();
        $this->query = join(' ', $this->parts);
        if( $this->interpolation ) {
            $this->interpolateParams();
        }
        return $this->query;
    }
37026
public function serialize()
    {
        $text = array();
        foreach ($this->parameters as $k => $v) {
            $text[] = $k . ': ' . $v;
        }
        foreach ($this->variables as $k => $v) {
            $text[] = 'Set: ' . $k . '=' . $v;
        }
        return implode("\n", $text);
    }
1007851
public function getQueryStr() {
		$queryData = (string)$this->_controller->request->query('query');
		$query = $this->_modelSearch->getQueryStr($queryData);

		return $query;
	}
594022
public function serialize(): string
    {
        return serialize([
            $this->password,
            $this->salt,
            $this->usernameCanonical,
            $this->username,
            $this->locked,
            $this->enabled,
            $this->id,
            $this->encoderName,
        ]);
    }
1174994
public function serialize()
    {
        $data = array(
            'coverage'      => $this->coverage,
            'filter'        => $this->filter,
            'options'       => $this->options,
            'path'          => $this->path,
        );

        return serialize($data);
    }
74085
public function serialize()
    {
        return serialize(array(
            $this->mask,
            $this->id,
            $this->securityIdentity,
            $this->strategy,
            $this->auditFailure,
            $this->auditSuccess,
            $this->granting,
        ));
    }
413218
public function serialize() {
        $data = array();
        foreach (get_object_vars($this) as $name => $value) {
            if (! $this->filterRequestNames($name)) {
                $data[$name] = $value;
            }
        }
        return serialize($data);
    }
147520
public function toString()
    {
        $request = sprintf('%s %s HTTP/%s', $this->getMethod(), (string) $this->getUrl(), $this->getVersion());

        $str = trim($request) . "\r\n";
        $str .= $this->getHeaders();
        $str .= "\r\n";
        $str .= $this->getContent();
        return $str;
    }
1124865
public function serialize()
    {
        $spec = array(
            '_aFeatures'      => $this->_aFeatures,
            '_aGroup'         => $this->_aGroup,
            '_browser'        => $this->_browser,
            '_browserVersion' => $this->_browserVersion,
            '_userAgent'      => $this->_userAgent,
            '_images'         => $this->_images,
        );
        return serialize($spec);
    }
161179
public function getQueryString()
    {
        $query = parent::getQueryString();
        if ($query) {
            $query .= '&';
        }

        if (!defined('REQUEST_TOKEN')) {
            throw new \RuntimeException('Request token not defined - can not append to query string.');
        }

        $query .= 'rt=' . REQUEST_TOKEN;

        return $query;
    }
318337
public function serialize()
    {
        return serialize(array(
            null === $this->parentAcl ? null : $this->parentAcl->getId(),
            $this->objectIdentity,
            $this->classAces,
            $this->classFieldAces,
            $this->objectAces,
            $this->objectFieldAces,
            $this->id,
            $this->loadedSids,
            $this->entriesInheriting,
        ));
    }
1034795
public function toHttpQuery()
    {
        return '?' . http_build_query(
            [
                'institution'    => $this->institution,
                'identityId'     => $this->identityId,
                'orderBy'        => $this->orderBy,
                'orderDirection' => $this->orderDirection,
                'p'              => $this->pageNumber,
            ]
        );
    }
185188
public function serialize()
	{
		// Load all of the inputs.
		$this->loadAllInputs();

		// Remove $_ENV and $_SERVER from the inputs.
		$inputs = $this->inputs;
		unset($inputs['env'], $inputs['server']);

		// Serialize the executable, args, options, data, and inputs.
		return serialize(array($this->executable, $this->args, $this->options, $this->data, $inputs));
	}