src/Services/PluginManager.php
private function publishBootstraps($register)
    {
        $classes = [];
        if (file_exists($this->path . '/src/Bootstraps')) {
            list_classes($classes, $this->path . '/src/Bootstraps', $this->namespace . 'Bootstraps');
        }
        if (empty($classes)) {
            return;
        }

        // Read enabled packages and add/remove the current plugin.

        $packages = $this->listPackages($register);

        // update manifest

        $dest = '';
        foreach ($packages as $package => $relativePath) {
            $path = base_path($relativePath);
            $classes = [];
            if (file_exists($path . '/src/Bootstraps')) {
                $namespace = $this->getNamespace($path . '/composer.json');
                list_classes($classes, $path . '/src/Bootstraps', $namespace . 'Bootstraps');
            }
            if (empty($classes)) {
                continue;
            }
            $dest .= PHP_EOL .
                '///////////////////////////////////////////////////////////////////////////////' . PHP_EOL .
                '// ' . $package . PHP_EOL .
                PHP_EOL;
            foreach ($classes as $class) {
                $dest .= '(new ' . $class . ')->boot();' . PHP_EOL;
            }
        }

        $this->saveContent($this->getManifest('bootstrap'), '<?php' . PHP_EOL . $dest);
    }
private function publishBootstraps($register)
    {
        $classes = [];
        if (file_exists($this->path . '/src/Bootstraps')) {
            list_classes($classes, $this->path . '/src/Bootstraps', $this->namespace . 'Bootstraps');
        }
        if (empty($classes)) {
            return;
        }

        // Read enabled packages and add/remove the current plugin.

        $packages = $this->listPackages($register);

        // update manifest

        $dest = '';
        foreach ($packages as $package => $relativePath) {
            $path = base_path($relativePath);
            $classes = [];
            if (file_exists($path . '/src/Bootstraps')) {
                $namespace = $this->getNamespace($path . '/composer.json');
                list_classes($classes, $path . '/src/Bootstraps', $namespace . 'Bootstraps');
            }
            if (empty($classes)) {
                continue;
            }
            $dest .= PHP_EOL .
                '///////////////////////////////////////////////////////////////////////////////' . PHP_EOL .
                '// ' . $package . PHP_EOL .
                PHP_EOL;
            foreach ($classes as $class) {
                $dest .= '(new ' . $class . ')->boot();' . PHP_EOL;
            }
        }

        $this->saveContent($this->getManifest('bootstrap'), '<?php' . PHP_EOL . $dest);
    }
private function publishBootstraps ( $ register ) { $ classes = [ ] ; if ( file_exists ( $ this -> path . '/src/Bootstraps' ) ) { list_classes ( $ classes , $ this -> path . '/src/Bootstraps' , $ this -> namespace . 'Bootstraps' ) ; } if ( empty ( $ classes ) ) { return ; } // Read enabled packages and add/remove the current plugin. $ packages = $ this -> listPackages ( $ register ) ; // update manifest $ dest = '' ; foreach ( $ packages as $ package => $ relativePath ) { $ path = base_path ( $ relativePath ) ; $ classes = [ ] ; if ( file_exists ( $ path . '/src/Bootstraps' ) ) { $ namespace = $ this -> getNamespace ( $ path . '/composer.json' ) ; list_classes ( $ classes , $ path . '/src/Bootstraps' , $ namespace . 'Bootstraps' ) ; } if ( empty ( $ classes ) ) { continue ; } $ dest .= PHP_EOL . '///////////////////////////////////////////////////////////////////////////////' . PHP_EOL . '// ' . $ package . PHP_EOL . PHP_EOL ; foreach ( $ classes as $ class ) { $ dest .= '(new ' . $ class . ')->boot();' . PHP_EOL ; } } $ this -> saveContent ( $ this -> getManifest ( 'bootstrap' ) , '<?php' . PHP_EOL . $ dest ) ; }
Update manifest "bootstraps.php".

@param bool $register
Update manifest bootstraps . php .