protected function compileComponents(Builder $query)
    {
        $request = [];

        foreach ($this->requestComponents as $component) {
            // To compile the query, we'll spin through each component of the query and
            // see if that component exists. If it does we'll just call the compiler
            // function for the component which is responsible for making the request.
            if (!is_null($query->$component)) {
                $method = 'compile' . ucfirst($component);

                $request[$component] = $this->$method($query, $query->$component);
            }
        }

        return $request;
    }
protected function compileComponents(Builder $query)
    {
        $request = [];

        foreach ($this->requestComponents as $component) {
            // To compile the query, we'll spin through each component of the query and
            // see if that component exists. If it does we'll just call the compiler
            // function for the component which is responsible for making the request.
            if (!is_null($query->$component)) {
                $method = 'compile' . ucfirst($component);

                $request[$component] = $this->$method($query, $query->$component);
            }
        }

        return $request;
    }
protected function compileComponents ( Builder $ query ) { $ request = [ ] ; foreach ( $ this -> requestComponents as $ component ) { // To compile the query, we'll spin through each component of the query and // see if that component exists. If it does we'll just call the compiler // function for the component which is responsible for making the request. if ( ! is_null ( $ query -> $ component ) ) { $ method = 'compile' . ucfirst ( $ component ) ; $ request [ $ component ] = $ this -> $ method ( $ query , $ query -> $ component ) ; } } return $ request ; }
Compile the components necessary for the request.

@param  \Kevindierkx\Elicit\Query\Builder
@return array
Compile the components necessary for the request .