public static function classFromRequest(Request $request, $fallbackClass = null)
    {
        /** @var AbstractHandler $handlerClass */
        foreach (static::$handlers as $handlerClass) {
            if ($handlerClass::canBeUsedForRequest($request)) {
                return $handlerClass;
                break;
            }
        }

        if (is_null($fallbackClass)) {
            // the default handler
            return static::$fallbackHandler;
        }

        return $fallbackClass;
    }
public static function classFromRequest(Request $request, $fallbackClass = null)
    {
        /** @var AbstractHandler $handlerClass */
        foreach (static::$handlers as $handlerClass) {
            if ($handlerClass::canBeUsedForRequest($request)) {
                return $handlerClass;
                break;
            }
        }

        if (is_null($fallbackClass)) {
            // the default handler
            return static::$fallbackHandler;
        }

        return $fallbackClass;
    }
public static function classFromRequest ( Request $ request , $ fallbackClass = null ) { /** @var AbstractHandler $handlerClass */ foreach ( static :: $ handlers as $ handlerClass ) { if ( $ handlerClass :: canBeUsedForRequest ( $ request ) ) { return $ handlerClass ; break ; } } if ( is_null ( $ fallbackClass ) ) { // the default handler return static :: $ fallbackHandler ; } return $ fallbackClass ; }
Returns handler class based on the request or the fallback handler.

@param Request     $request
@param string|null $fallbackClass

@return string
Returns handler class based on the request or the fallback handler .