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;
    }
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;
    }
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 ; }
Extract tracking parameters from query or from cookies.

@param Request $request

@return ParameterBag
Extract tracking parameters from query or from cookies .