src/Terion/PackageInstaller/PackageInstallCommand.php
protected function searchPackage($packageName)
    {
        $this->comment('Searching for package...');
        $packages = $this->packagist->search($packageName);
        $total = count($packages);

        if ($total === 0) {
            $this->comment('No packages found');
            exit;
        }
        $this->comment('Found ' . $total . ' packages:');

        foreach ($packages as $i => $package) {
            $this->getOutput()->writeln(sprintf(
                '[%d] <info>%s</info> (%s)',
                $i + 1,
                $package->getName(),
                $package->getDescription()
            ));
        }

        $this->choosePackage($packages);
    }
protected function searchPackage($packageName)
    {
        $this->comment('Searching for package...');
        $packages = $this->packagist->search($packageName);
        $total = count($packages);

        if ($total === 0) {
            $this->comment('No packages found');
            exit;
        }
        $this->comment('Found ' . $total . ' packages:');

        foreach ($packages as $i => $package) {
            $this->getOutput()->writeln(sprintf(
                '[%d] <info>%s</info> (%s)',
                $i + 1,
                $package->getName(),
                $package->getDescription()
            ));
        }

        $this->choosePackage($packages);
    }
protected function searchPackage ( $ packageName ) { $ this -> comment ( 'Searching for package...' ) ; $ packages = $ this -> packagist -> search ( $ packageName ) ; $ total = count ( $ packages ) ; if ( $ total === 0 ) { $ this -> comment ( 'No packages found' ) ; exit ; } $ this -> comment ( 'Found ' . $ total . ' packages:' ) ; foreach ( $ packages as $ i => $ package ) { $ this -> getOutput ( ) -> writeln ( sprintf ( '[%d] <info>%s</info> (%s)' , $ i + 1 , $ package -> getName ( ) , $ package -> getDescription ( ) ) ) ; } $ this -> choosePackage ( $ packages ) ; }
Perform search on packagist and ask package select.

@param $packageName
Perform search on packagist and ask package select .