OXIESEC PANEL
- Current Dir:
/
/
usr
/
share
/
php
/
Composer
/
Command
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
π
..
-
07/20/2024 06:32:22 AM
rwxr-xr-x
π
AboutCommand.php
1.1 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
ArchiveCommand.php
6.42 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
BaseCommand.php
4.51 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
BaseDependencyCommand.php
9.7 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
CheckPlatformReqsCommand.php
4.9 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
ClearCacheCommand.php
1.99 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
ConfigCommand.php
26.21 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
CreateProjectCommand.php
17.35 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
DependsCommand.php
1.29 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
DiagnoseCommand.php
25.52 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
DumpAutoloadCommand.php
3.21 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
ExecCommand.php
2.74 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
GlobalCommand.php
2.86 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
HomeCommand.php
5.29 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
InitCommand.php
28.09 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
InstallCommand.php
6.17 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
LicensesCommand.php
5.32 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
OutdatedCommand.php
3.44 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
ProhibitsCommand.php
1.31 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
RemoveCommand.php
6.81 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
RequireCommand.php
10.15 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
RunScriptCommand.php
4.82 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
ScriptAliasCommand.php
1.88 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
SearchCommand.php
2.86 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
SelfUpdateCommand.php
16.48 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
ShowCommand.php
37.82 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
StatusCommand.php
7.89 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
SuggestsCommand.php
5.1 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
UpdateCommand.php
10.82 KB
01/31/2018 03:28:18 PM
rw-r--r--
π
ValidateCommand.php
6.73 KB
01/31/2018 03:28:18 PM
rw-r--r--
Editing: SearchCommand.php
Close
<?php /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Command; use Composer\Factory; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Composer\Repository\CompositeRepository; use Composer\Repository\PlatformRepository; use Composer\Repository\RepositoryInterface; use Composer\Plugin\CommandEvent; use Composer\Plugin\PluginEvents; /** * @author Robert SchΓΆnthal <seroscho@googlemail.com> */ class SearchCommand extends BaseCommand { protected $matches; protected $lowMatches = array(); protected $tokens; protected $output; protected $onlyName; protected function configure() { $this ->setName('search') ->setDescription('Searches for packages.') ->setDefinition(array( new InputOption('only-name', 'N', InputOption::VALUE_NONE, 'Search only in name'), new InputOption('type', 't', InputOption::VALUE_REQUIRED, 'Search for a specific package type'), new InputArgument('tokens', InputArgument::IS_ARRAY | InputArgument::REQUIRED, 'tokens to search for'), )) ->setHelp(<<<EOT The search command searches for packages by its name <info>php composer.phar search symfony composer</info> EOT ) ; } protected function execute(InputInterface $input, OutputInterface $output) { // init repos $platformRepo = new PlatformRepository; $io = $this->getIO(); if (!($composer = $this->getComposer(false))) { $composer = Factory::create($this->getIO(), array()); } $localRepo = $composer->getRepositoryManager()->getLocalRepository(); $installedRepo = new CompositeRepository(array($localRepo, $platformRepo)); $repos = new CompositeRepository(array_merge(array($installedRepo), $composer->getRepositoryManager()->getRepositories())); $commandEvent = new CommandEvent(PluginEvents::COMMAND, 'search', $input, $output); $composer->getEventDispatcher()->dispatch($commandEvent->getName(), $commandEvent); $onlyName = $input->getOption('only-name'); $type = $input->getOption('type') ?: null; $flags = $onlyName ? RepositoryInterface::SEARCH_NAME : RepositoryInterface::SEARCH_FULLTEXT; $results = $repos->search(implode(' ', $input->getArgument('tokens')), $flags, $type); foreach ($results as $result) { $io->write($result['name'] . (isset($result['description']) ? ' '. $result['description'] : '')); } } }