src/Control/Director.php
public static function forceWWW(HTTPRequest $request = null)
    {
        $handler = CanonicalURLMiddleware::singleton()->setForceWWW(true);
        $handler->throwRedirectIfNeeded($request);
    }
public static function forceWWW(HTTPRequest $request = null)
    {
        $handler = CanonicalURLMiddleware::singleton()->setForceWWW(true);
        $handler->throwRedirectIfNeeded($request);
    }
public static function forceWWW ( HTTPRequest $ request = null ) { $ handler = CanonicalURLMiddleware :: singleton ( ) -> setForceWWW ( true ) ; $ handler -> throwRedirectIfNeeded ( $ request ) ; }
Force a redirect to a domain starting with "www."

@param HTTPRequest $request
Force a redirect to a domain starting with www .