private function addOptionalQuery(array $queryParam, Query $query)
    {
        if (!is_null($query)) {
            $selectedFields = $query->getSelectFields();
            if (!empty($selectedFields)) {
                $final = $this->encodeODataUriValues($selectedFields);

                $this->addOptionalQueryParam(
                    $queryParam,
                    Resources::QP_SELECT,
                    implode(',', $final)
                );
            }

            if (!is_null($query->getTop())) {
                $final = strval($this->encodeODataUriValue($query->getTop()));

                $this->addOptionalQueryParam(
                    $queryParam,
                    Resources::QP_TOP,
                    $final
                );
            }

            if (!is_null($query->getFilter())) {
                $final = $this->buildFilterExpression($query->getFilter());
                $this->addOptionalQueryParam(
                    $queryParam,
                    Resources::QP_FILTER,
                    $final
                );
            }
        }

        return $queryParam;
    }
private function addOptionalQuery(array $queryParam, Query $query)
    {
        if (!is_null($query)) {
            $selectedFields = $query->getSelectFields();
            if (!empty($selectedFields)) {
                $final = $this->encodeODataUriValues($selectedFields);

                $this->addOptionalQueryParam(
                    $queryParam,
                    Resources::QP_SELECT,
                    implode(',', $final)
                );
            }

            if (!is_null($query->getTop())) {
                $final = strval($this->encodeODataUriValue($query->getTop()));

                $this->addOptionalQueryParam(
                    $queryParam,
                    Resources::QP_TOP,
                    $final
                );
            }

            if (!is_null($query->getFilter())) {
                $final = $this->buildFilterExpression($query->getFilter());
                $this->addOptionalQueryParam(
                    $queryParam,
                    Resources::QP_FILTER,
                    $final
                );
            }
        }

        return $queryParam;
    }
private function addOptionalQuery ( array $ queryParam , Query $ query ) { if ( ! is_null ( $ query ) ) { $ selectedFields = $ query -> getSelectFields ( ) ; if ( ! empty ( $ selectedFields ) ) { $ final = $ this -> encodeODataUriValues ( $ selectedFields ) ; $ this -> addOptionalQueryParam ( $ queryParam , Resources :: QP_SELECT , implode ( ',' , $ final ) ) ; } if ( ! is_null ( $ query -> getTop ( ) ) ) { $ final = strval ( $ this -> encodeODataUriValue ( $ query -> getTop ( ) ) ) ; $ this -> addOptionalQueryParam ( $ queryParam , Resources :: QP_TOP , $ final ) ; } if ( ! is_null ( $ query -> getFilter ( ) ) ) { $ final = $ this -> buildFilterExpression ( $ query -> getFilter ( ) ) ; $ this -> addOptionalQueryParam ( $ queryParam , Resources :: QP_FILTER , $ final ) ; } } return $ queryParam ; }
Adds query object to the query parameter array

@param array $queryParam The URI query parameters
@param Query $query      The query object

@return array
Adds query object to the query parameter array