public static function assign($sitePath, $siteName, $uri)
    {
        $drivers = [];

        if ($customSiteDriver = static::customSiteDriver($sitePath)) {
            $drivers[] = $customSiteDriver;
        }

        $drivers = array_merge($drivers, static::driversIn(VALET_HOME_PATH.'/Drivers'));

        $drivers[] = 'LaravelValetDriver';

        $drivers[] = 'WordPressValetDriver';
        $drivers[] = 'BedrockValetDriver';
        $drivers[] = 'ContaoValetDriver';
        $drivers[] = 'SymfonyValetDriver';
        $drivers[] = 'CraftValetDriver';
        $drivers[] = 'StatamicValetDriver';
        $drivers[] = 'StatamicV1ValetDriver';
        $drivers[] = 'CakeValetDriver';
        $drivers[] = 'SculpinValetDriver';
        $drivers[] = 'JigsawValetDriver';
        $drivers[] = 'KirbyValetDriver';
        $drivers[] = 'KatanaValetDriver';
        $drivers[] = 'JoomlaValetDriver';
        $drivers[] = 'DrupalValetDriver';
        $drivers[] = 'Concrete5ValetDriver';
        $drivers[] = 'Typo3ValetDriver';
        $drivers[] = 'NeosValetDriver';
        $drivers[] = 'Magento2ValetDriver';

        $drivers[] = 'BasicValetDriver';

        foreach ($drivers as $driver) {
            $driver = new $driver;

            if ($driver->serves($sitePath, $siteName, $driver->mutateUri($uri))) {
                return $driver;
            }
        }
    }
public static function assign($sitePath, $siteName, $uri)
    {
        $drivers = [];

        if ($customSiteDriver = static::customSiteDriver($sitePath)) {
            $drivers[] = $customSiteDriver;
        }

        $drivers = array_merge($drivers, static::driversIn(VALET_HOME_PATH.'/Drivers'));

        $drivers[] = 'LaravelValetDriver';

        $drivers[] = 'WordPressValetDriver';
        $drivers[] = 'BedrockValetDriver';
        $drivers[] = 'ContaoValetDriver';
        $drivers[] = 'SymfonyValetDriver';
        $drivers[] = 'CraftValetDriver';
        $drivers[] = 'StatamicValetDriver';
        $drivers[] = 'StatamicV1ValetDriver';
        $drivers[] = 'CakeValetDriver';
        $drivers[] = 'SculpinValetDriver';
        $drivers[] = 'JigsawValetDriver';
        $drivers[] = 'KirbyValetDriver';
        $drivers[] = 'KatanaValetDriver';
        $drivers[] = 'JoomlaValetDriver';
        $drivers[] = 'DrupalValetDriver';
        $drivers[] = 'Concrete5ValetDriver';
        $drivers[] = 'Typo3ValetDriver';
        $drivers[] = 'NeosValetDriver';
        $drivers[] = 'Magento2ValetDriver';

        $drivers[] = 'BasicValetDriver';

        foreach ($drivers as $driver) {
            $driver = new $driver;

            if ($driver->serves($sitePath, $siteName, $driver->mutateUri($uri))) {
                return $driver;
            }
        }
    }
public static function assign ( $ sitePath , $ siteName , $ uri ) { $ drivers = [ ] ; if ( $ customSiteDriver = static :: customSiteDriver ( $ sitePath ) ) { $ drivers [ ] = $ customSiteDriver ; } $ drivers = array_merge ( $ drivers , static :: driversIn ( VALET_HOME_PATH . '/Drivers' ) ) ; $ drivers [ ] = 'LaravelValetDriver' ; $ drivers [ ] = 'WordPressValetDriver' ; $ drivers [ ] = 'BedrockValetDriver' ; $ drivers [ ] = 'ContaoValetDriver' ; $ drivers [ ] = 'SymfonyValetDriver' ; $ drivers [ ] = 'CraftValetDriver' ; $ drivers [ ] = 'StatamicValetDriver' ; $ drivers [ ] = 'StatamicV1ValetDriver' ; $ drivers [ ] = 'CakeValetDriver' ; $ drivers [ ] = 'SculpinValetDriver' ; $ drivers [ ] = 'JigsawValetDriver' ; $ drivers [ ] = 'KirbyValetDriver' ; $ drivers [ ] = 'KatanaValetDriver' ; $ drivers [ ] = 'JoomlaValetDriver' ; $ drivers [ ] = 'DrupalValetDriver' ; $ drivers [ ] = 'Concrete5ValetDriver' ; $ drivers [ ] = 'Typo3ValetDriver' ; $ drivers [ ] = 'NeosValetDriver' ; $ drivers [ ] = 'Magento2ValetDriver' ; $ drivers [ ] = 'BasicValetDriver' ; foreach ( $ drivers as $ driver ) { $ driver = new $ driver ; if ( $ driver -> serves ( $ sitePath , $ siteName , $ driver -> mutateUri ( $ uri ) ) ) { return $ driver ; } } }
Find a driver that can serve the incoming request.

@param  string  $sitePath
@param  string  $siteName
@param  string  $uri
@return ValetDriver|null
Find a driver that can serve the incoming request .