src/Formatter.php
private function formatQueryElement($key, $value, EntityMetadata $metadata, Store $store)
    {
        // Handle root fields: id or model type.
        if (null !== $result = $this->formatQueryElementRoot($key, $value, $metadata)) {
            return $result;
        }

        // Handle attributes.
        if (null !== $result = $this->formatQueryElementAttr($key, $value, $metadata, $store)) {
            return $result;
        }

        // Handle relationships.
        if (null !== $result = $this->formatQueryElementRel($key, $value, $metadata, $store)) {
            return $result;
        }

        // Handle dot notated fields.
        if (null !== $result = $this->formatQueryElementDotted($key, $value, $metadata, $store)) {
            return $result;
        }

        // Pass remaining elements unconverted.
        return [$key, $value];
    }
private function formatQueryElement($key, $value, EntityMetadata $metadata, Store $store)
    {
        // Handle root fields: id or model type.
        if (null !== $result = $this->formatQueryElementRoot($key, $value, $metadata)) {
            return $result;
        }

        // Handle attributes.
        if (null !== $result = $this->formatQueryElementAttr($key, $value, $metadata, $store)) {
            return $result;
        }

        // Handle relationships.
        if (null !== $result = $this->formatQueryElementRel($key, $value, $metadata, $store)) {
            return $result;
        }

        // Handle dot notated fields.
        if (null !== $result = $this->formatQueryElementDotted($key, $value, $metadata, $store)) {
            return $result;
        }

        // Pass remaining elements unconverted.
        return [$key, $value];
    }
private function formatQueryElement ( $ key , $ value , EntityMetadata $ metadata , Store $ store ) { // Handle root fields: id or model type. if ( null !== $ result = $ this -> formatQueryElementRoot ( $ key , $ value , $ metadata ) ) { return $ result ; } // Handle attributes. if ( null !== $ result = $ this -> formatQueryElementAttr ( $ key , $ value , $ metadata , $ store ) ) { return $ result ; } // Handle relationships. if ( null !== $ result = $ this -> formatQueryElementRel ( $ key , $ value , $ metadata , $ store ) ) { return $ result ; } // Handle dot notated fields. if ( null !== $ result = $ this -> formatQueryElementDotted ( $ key , $ value , $ metadata , $ store ) ) { return $ result ; } // Pass remaining elements unconverted. return [ $ key , $ value ] ; }
Formats a query element and ensures the correct key and value are set.
Returns a tuple of the formatted key and value.

@param   string          $key
@param   mixed           $value
@param   EntityMetadata  $metadata
@param   Store           $store
@return  array
Formats a query element and ensures the correct key and value are set . Returns a tuple of the formatted key and value .