Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.119
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
php /
Composer /
Command /
Delete
Unzip
Name
Size
Permission
Date
Action
AboutCommand.php
1.09
KB
-rw-r--r--
2016-11-03 17:43
ArchiveCommand.php
5.99
KB
-rw-r--r--
2016-11-03 17:43
BaseCommand.php
3.2
KB
-rw-r--r--
2016-11-03 17:43
BaseDependencyCommand.php
9.7
KB
-rw-r--r--
2016-11-03 17:43
ClearCacheCommand.php
1.99
KB
-rw-r--r--
2016-11-03 17:43
ConfigCommand.php
24.83
KB
-rw-r--r--
2016-11-03 17:43
CreateProjectCommand.php
17.9
KB
-rw-r--r--
2016-11-03 17:43
DependsCommand.php
1.29
KB
-rw-r--r--
2016-11-03 17:43
DiagnoseCommand.php
25.02
KB
-rw-r--r--
2016-11-03 17:43
DumpAutoloadCommand.php
2.85
KB
-rw-r--r--
2016-11-03 17:43
ExecCommand.php
2.56
KB
-rw-r--r--
2016-11-03 17:43
GlobalCommand.php
2.73
KB
-rw-r--r--
2016-11-03 17:43
HomeCommand.php
5.08
KB
-rw-r--r--
2016-11-03 17:43
InitCommand.php
22.81
KB
-rw-r--r--
2016-11-03 17:43
InstallCommand.php
6.43
KB
-rw-r--r--
2016-11-03 17:43
LicensesCommand.php
5.33
KB
-rw-r--r--
2016-11-03 17:43
OutdatedCommand.php
2.72
KB
-rw-r--r--
2016-11-03 17:43
ProhibitsCommand.php
1.31
KB
-rw-r--r--
2016-11-03 17:43
RemoveCommand.php
6.64
KB
-rw-r--r--
2016-11-03 17:43
RequireCommand.php
9.52
KB
-rw-r--r--
2016-11-03 17:43
RunScriptCommand.php
4.25
KB
-rw-r--r--
2016-11-03 17:43
ScriptAliasCommand.php
1.76
KB
-rw-r--r--
2016-11-03 17:43
SearchCommand.php
2.86
KB
-rw-r--r--
2016-11-03 17:43
SelfUpdateCommand.php
15.48
KB
-rw-r--r--
2016-11-03 17:43
ShowCommand.php
32.06
KB
-rw-r--r--
2016-11-03 17:43
StatusCommand.php
7.91
KB
-rw-r--r--
2016-11-03 17:43
SuggestsCommand.php
5.1
KB
-rw-r--r--
2016-11-03 17:43
UpdateCommand.php
10.69
KB
-rw-r--r--
2016-11-03 17:43
ValidateCommand.php
6.72
KB
-rw-r--r--
2016-11-03 17:43
Save
Rename
<?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\Json\JsonFile; use Composer\Plugin\CommandEvent; use Composer\Plugin\PluginEvents; use Composer\Package\PackageInterface; use Composer\Repository\RepositoryInterface; use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; /** * @author BenoƮt Merlet <benoit.merlet@gmail.com> */ class LicensesCommand extends BaseCommand { protected function configure() { $this ->setName('licenses') ->setDescription('Show information about licenses of dependencies') ->setDefinition(array( new InputOption('format', 'f', InputOption::VALUE_REQUIRED, 'Format of the output: text or json', 'text'), new InputOption('no-dev', null, InputOption::VALUE_NONE, 'Disables search in require-dev packages.'), )) ->setHelp(<<<EOT The license command displays detailed information about the licenses of the installed dependencies. EOT ) ; } protected function execute(InputInterface $input, OutputInterface $output) { $composer = $this->getComposer(); $commandEvent = new CommandEvent(PluginEvents::COMMAND, 'licenses', $input, $output); $composer->getEventDispatcher()->dispatch($commandEvent->getName(), $commandEvent); $root = $composer->getPackage(); $repo = $composer->getRepositoryManager()->getLocalRepository(); if ($input->getOption('no-dev')) { $packages = $this->filterRequiredPackages($repo, $root); } else { $packages = $this->appendPackages($repo->getPackages(), array()); } ksort($packages); $io = $this->getIO(); switch ($format = $input->getOption('format')) { case 'text': $io->write('Name: <comment>'.$root->getPrettyName().'</comment>'); $io->write('Version: <comment>'.$root->getFullPrettyVersion().'</comment>'); $io->write('Licenses: <comment>'.(implode(', ', $root->getLicense()) ?: 'none').'</comment>'); $io->write('Dependencies:'); $io->write(''); $table = new Table($output); $table->setStyle('compact'); $table->getStyle()->setVerticalBorderChar(''); $table->getStyle()->setCellRowContentFormat('%s '); $table->setHeaders(array('Name', 'Version', 'License')); foreach ($packages as $package) { $table->addRow(array( $package->getPrettyName(), $package->getFullPrettyVersion(), implode(', ', $package->getLicense()) ?: 'none', )); } $table->render(); break; case 'json': $dependencies = array(); foreach ($packages as $package) { $dependencies[$package->getPrettyName()] = array( 'version' => $package->getFullPrettyVersion(), 'license' => $package->getLicense(), ); } $io->write(JsonFile::encode(array( 'name' => $root->getPrettyName(), 'version' => $root->getFullPrettyVersion(), 'license' => $root->getLicense(), 'dependencies' => $dependencies, ))); break; default: throw new \RuntimeException(sprintf('Unsupported format "%s". See help for supported formats.', $format)); } } /** * Find package requires and child requires * * @param RepositoryInterface $repo * @param PackageInterface $package * @param array $bucket * @return array */ private function filterRequiredPackages(RepositoryInterface $repo, PackageInterface $package, $bucket = array()) { $requires = array_keys($package->getRequires()); $packageListNames = array_keys($bucket); $packages = array_filter( $repo->getPackages(), function ($package) use ($requires, $packageListNames) { return in_array($package->getName(), $requires) && !in_array($package->getName(), $packageListNames); } ); $bucket = $this->appendPackages($packages, $bucket); foreach ($packages as $package) { $bucket = $this->filterRequiredPackages($repo, $package, $bucket); } return $bucket; } /** * Adds packages to the package list * * @param array $packages the list of packages to add * @param array $bucket the list to add packages to * @return array */ public function appendPackages(array $packages, array $bucket) { foreach ($packages as $package) { $bucket[$package->getName()] = $package; } return $bucket; } }