original_string: public function extract(Request $request)
      {
          $trackingParameters = new ParameterBag();
  
          /** Get value from cookies. */
          foreach ($this->extracters as $extracter) {
              if ($extracter instanceof TrackingParameterCookieExtracterInterface) {
                  $trackingParameters->add($extracter->extractFromCookies($request->cookies));
              }
          }
  
          /** Override cookies' value by query's value if set. */
          foreach ($this->extracters as $extracter) {
              if ($extracter instanceof TrackingParameterQueryExtracterInterface) {
                  $trackingParameters->add($extracter->extractFromQuery($request->query));
              }
          }
  
          return $trackingParameters;
      }
code: public function extract(Request $request)
      {
          $trackingParameters = new ParameterBag();
  
          /** Get value from cookies. */
          foreach ($this->extracters as $extracter) {
              if ($extracter instanceof TrackingParameterCookieExtracterInterface) {
                  $trackingParameters->add($extracter->extractFromCookies($request->cookies));
              }
          }
  
          /** Override cookies' value by query's value if set. */
          foreach ($this->extracters as $extracter) {
              if ($extracter instanceof TrackingParameterQueryExtracterInterface) {
                  $trackingParameters->add($extracter->extractFromQuery($request->query));
              }
          }
  
          return $trackingParameters;
      }
code_tokens: public function extract ( Request $ request ) { $ trackingParameters = new ParameterBag ( ) ; /** Get value from cookies. */ foreach ( $ this -> extracters as $ extracter ) { if ( $ extracter instanceof TrackingParameterCookieExtracterInterface ) { $ trackingParameters -> add ( $ extracter -> extractFromCookies ( $ request -> cookies ) ) ; } } /** Override cookies' value by query's value if set. */ foreach ( $ this -> extracters as $ extracter ) { if ( $ extracter instanceof TrackingParameterQueryExtracterInterface ) { $ trackingParameters -> add ( $ extracter -> extractFromQuery ( $ request -> query ) ) ; } } return $ trackingParameters ; }
docstring: Extract tracking parameters from query or from cookies.
  
  @param Request $request
  
  @return ParameterBag
docstring_tokens: Extract tracking parameters from query or from cookies .