File Manager Lite
Dir:
/home/u540325668/domains/mkjsindia.org/public_html/vendor/psy/psysh/src/Command
Upload
[..]
BufferCommand.php (2.17 KB)
Edit
Rename
Del
ClearCommand.php (1.03 KB)
Edit
Rename
Del
Command.php (7.47 KB)
Edit
Rename
Del
DocCommand.php (4.16 KB)
Edit
Rename
Del
DumpCommand.php (2.48 KB)
Edit
Rename
Del
EditCommand.php (5.58 KB)
Edit
Rename
Del
ExitCommand.php (1.06 KB)
Edit
Rename
Del
HelpCommand.php (2.71 KB)
Edit
Rename
Del
HistoryCommand.php (7.47 KB)
Edit
Rename
Del
ListCommand/
Rename
Del
ListCommand.php (9.69 KB)
Edit
Rename
Del
ParseCommand.php (4.91 KB)
Edit
Rename
Del
PsyVersionCommand.php (953 B)
Edit
Rename
Del
ReflectingCommand.php (9.41 KB)
Edit
Rename
Del
ShowCommand.php (9.26 KB)
Edit
Rename
Del
SudoCommand.php (3.68 KB)
Edit
Rename
Del
ThrowUpCommand.php (4.44 KB)
Edit
Rename
Del
TimeitCommand/
Rename
Del
TimeitCommand.php (5.23 KB)
Edit
Rename
Del
TraceCommand.php (5.03 KB)
Edit
Rename
Del
WhereamiCommand.php (4.06 KB)
Edit
Rename
Del
WtfCommand.php (3.58 KB)
Edit
Rename
Del
Edit: HelpCommand.php
<?php /* * This file is part of Psy Shell. * * (c) 2012-2018 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Psy\Command; use Symfony\Component\Console\Helper\TableHelper; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; /** * Help command. * * Lists available commands, and gives command-specific help when asked nicely. */ class HelpCommand extends Command { private $command; /** * {@inheritdoc} */ protected function configure() { $this ->setName('help') ->setAliases(['?']) ->setDefinition([ new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name.', null), ]) ->setDescription('Show a list of commands. Type `help [foo]` for information about [foo].') ->setHelp('My. How meta.'); } /** * Helper for setting a subcommand to retrieve help for. * * @param Command $command */ public function setCommand($command) { $this->command = $command; } /** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { if ($this->command !== null) { // help for an individual command $output->page($this->command->asText()); $this->command = null; } elseif ($name = $input->getArgument('command_name')) { // help for an individual command $output->page($this->getApplication()->get($name)->asText()); } else { // list available commands $commands = $this->getApplication()->all(); $table = $this->getTable($output); foreach ($commands as $name => $command) { if ($name !== $command->getName()) { continue; } if ($command->getAliases()) { $aliases = \sprintf('<comment>Aliases:</comment> %s', \implode(', ', $command->getAliases())); } else { $aliases = ''; } $table->addRow([ \sprintf('<info>%s</info>', $name), $command->getDescription(), $aliases, ]); } $output->startPaging(); if ($table instanceof TableHelper) { $table->render($output); } else { $table->render(); } $output->stopPaging(); } return 0; } }
Simpan