src/VendorExposeTask.php
public function process(IOInterface $io, array $libraries, $methodKey = null)
    {
        // No-op
        if (empty($libraries)) {
            return;
        }

        // Setup root folder
        $this->setupResources($io);

        // Get or choose method
        if (!$methodKey) {
            $methodKey = $this->getMethodKey();
        }
        $method = $this->getMethod($methodKey);

        // Update all modules
        foreach ($libraries as $module) {
            // Skip this module if no exposure required
            if (!$module->requiresExpose()) {
                continue;
            }
            $name = $module->getName();
            $type = $module->getType();
            $io->write(
                "Exposing web directories for {$type} <info>{$name}</info> with method <info>{$methodKey}</info>:"
            );
            foreach ($module->getExposedFolders() as $folder) {
                $io->write("  - <info>$folder</info>");
            }

            // Expose web dirs with given method
            $module->exposePaths($method);
        }

        // On success, write `.method` token to persist for subsequent updates
        $this->saveMethodKey($methodKey);
    }
public function process(IOInterface $io, array $libraries, $methodKey = null)
    {
        // No-op
        if (empty($libraries)) {
            return;
        }

        // Setup root folder
        $this->setupResources($io);

        // Get or choose method
        if (!$methodKey) {
            $methodKey = $this->getMethodKey();
        }
        $method = $this->getMethod($methodKey);

        // Update all modules
        foreach ($libraries as $module) {
            // Skip this module if no exposure required
            if (!$module->requiresExpose()) {
                continue;
            }
            $name = $module->getName();
            $type = $module->getType();
            $io->write(
                "Exposing web directories for {$type} <info>{$name}</info> with method <info>{$methodKey}</info>:"
            );
            foreach ($module->getExposedFolders() as $folder) {
                $io->write("  - <info>$folder</info>");
            }

            // Expose web dirs with given method
            $module->exposePaths($method);
        }

        // On success, write `.method` token to persist for subsequent updates
        $this->saveMethodKey($methodKey);
    }
public function process ( IOInterface $ io , array $ libraries , $ methodKey = null ) { // No-op if ( empty ( $ libraries ) ) { return ; } // Setup root folder $ this -> setupResources ( $ io ) ; // Get or choose method if ( ! $ methodKey ) { $ methodKey = $ this -> getMethodKey ( ) ; } $ method = $ this -> getMethod ( $ methodKey ) ; // Update all modules foreach ( $ libraries as $ module ) { // Skip this module if no exposure required if ( ! $ module -> requiresExpose ( ) ) { continue ; } $ name = $ module -> getName ( ) ; $ type = $ module -> getType ( ) ; $ io -> write ( "Exposing web directories for {$type} <info>{$name}</info> with method <info>{$methodKey}</info>:" ) ; foreach ( $ module -> getExposedFolders ( ) as $ folder ) { $ io -> write ( "  - <info>$folder</info>" ) ; } // Expose web dirs with given method $ module -> exposePaths ( $ method ) ; } // On success, write `.method` token to persist for subsequent updates $ this -> saveMethodKey ( $ methodKey ) ; }
Expose all modules with the given method

@param IOInterface $io
@param Library[] $libraries
@param string $methodKey Method key, or null to auto-detect from environment
Expose all modules with the given method