src/VendorExposeTask.php
protected function getMethod($key)
    {
        switch ($key) {
            case CopyMethod::NAME:
                return new CopyMethod();
            case SymlinkMethod::NAME:
                return new SymlinkMethod();
            case JunctionMethod::NAME:
                return new JunctionMethod();
            case VendorPlugin::METHOD_NONE:
                // 'none' is forced to an empty chain
                return new ChainedMethod([]);
            case VendorPlugin::METHOD_AUTO:
                // Default to safe-failover method
                if (Platform::isWindows()) {
                    // Use junctions on windows environment
                    return new ChainedMethod(new JunctionMethod(), new CopyMethod());
                } else {
                    // Use symlink on non-windows environments
                    return new ChainedMethod(new SymlinkMethod(), new CopyMethod());
                }
            default:
                throw new InvalidArgumentException("Invalid method: {$key}");
        }
    }
protected function getMethod($key)
    {
        switch ($key) {
            case CopyMethod::NAME:
                return new CopyMethod();
            case SymlinkMethod::NAME:
                return new SymlinkMethod();
            case JunctionMethod::NAME:
                return new JunctionMethod();
            case VendorPlugin::METHOD_NONE:
                // 'none' is forced to an empty chain
                return new ChainedMethod([]);
            case VendorPlugin::METHOD_AUTO:
                // Default to safe-failover method
                if (Platform::isWindows()) {
                    // Use junctions on windows environment
                    return new ChainedMethod(new JunctionMethod(), new CopyMethod());
                } else {
                    // Use symlink on non-windows environments
                    return new ChainedMethod(new SymlinkMethod(), new CopyMethod());
                }
            default:
                throw new InvalidArgumentException("Invalid method: {$key}");
        }
    }
protected function getMethod ( $ key ) { switch ( $ key ) { case CopyMethod :: NAME : return new CopyMethod ( ) ; case SymlinkMethod :: NAME : return new SymlinkMethod ( ) ; case JunctionMethod :: NAME : return new JunctionMethod ( ) ; case VendorPlugin :: METHOD_NONE : // 'none' is forced to an empty chain return new ChainedMethod ( [ ] ) ; case VendorPlugin :: METHOD_AUTO : // Default to safe-failover method if ( Platform :: isWindows ( ) ) { // Use junctions on windows environment return new ChainedMethod ( new JunctionMethod ( ) , new CopyMethod ( ) ) ; } else { // Use symlink on non-windows environments return new ChainedMethod ( new SymlinkMethod ( ) , new CopyMethod ( ) ) ; } default : throw new InvalidArgumentException ( "Invalid method: {$key}" ) ; } }
Get named method instance

@param string $key Key of method to use
@return ExposeMethod
Get named method instance