original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Compile the components necessary for the request.
  
  @param  \Kevindierkx\Elicit\Query\Builder
  @return array
docstring_tokens: Compile the components necessary for the request .