/home/techb158/ileadtechnology.com/SSM/vendor/psy/psysh/src/Command
NameSizeModeActions
ListCommand/-0755rm
TimeitCommand/-0755rm
BufferCommand.php22180644editdlrm
ClearCommand.php10590644editdlrm
Command.php79580644editdlrm
DocCommand.php43560644editdlrm
DumpCommand.php25400644editdlrm
EditCommand.php57090644editdlrm
ExitCommand.php10840644editdlrm
HelpCommand.php29440644editdlrm
HistoryCommand.php76500644editdlrm
ListCommand.php101210644editdlrm
ParseCommand.php50270644editdlrm
PsyVersionCommand.php9530644editdlrm
ReflectingCommand.php105780644editdlrm
ShowCommand.php95180644editdlrm
SudoCommand.php37720644editdlrm
ThrowUpCommand.php45040644editdlrm
TimeitCommand.php53530644editdlrm
TraceCommand.php51540644editdlrm
WhereamiCommand.php43260644editdlrm
WtfCommand.php37910644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/vendor/psy/psysh/src/Command/DocCommand.php (4356B)
setName('doc') ->setAliases(['rtfm', 'man']) ->setDefinition([ new CodeArgument('target', CodeArgument::REQUIRED, 'Function, class, instance, constant, method or property to document.'), ]) ->setDescription('Read the documentation for an object, class, constant, method or property.') ->setHelp( <<>>> doc preg_replace >>> doc Psy\Shell >>> doc Psy\Shell::debug >>> \$s = new Psy\Shell >>> doc \$s->run HELP ); } /** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $value = $input->getArgument('target'); if (ReflectionLanguageConstruct::isLanguageConstruct($value)) { $reflector = new ReflectionLanguageConstruct($value); $doc = $this->getManualDocById($value); } else { list($target, $reflector) = $this->getTargetAndReflector($value); $doc = $this->getManualDoc($reflector) ?: DocblockFormatter::format($reflector); } $db = $this->getApplication()->getManualDb(); $output->page(function ($output) use ($reflector, $doc, $db) { $output->writeln(SignatureFormatter::format($reflector)); $output->writeln(''); if (empty($doc) && !$db) { $output->writeln('PHP manual not found'); $output->writeln(' To document core PHP functionality, download the PHP reference manual:'); $output->writeln(' https://github.com/bobthecow/psysh/wiki/PHP-manual'); } else { $output->writeln($doc); } }); // Set some magic local variables $this->setCommandScopeVariables($reflector); return 0; } private function getManualDoc($reflector) { switch (\get_class($reflector)) { case \ReflectionClass::class: case \ReflectionObject::class: case \ReflectionFunction::class: $id = $reflector->name; break; case \ReflectionMethod::class: $id = $reflector->class . '::' . $reflector->name; break; case \ReflectionProperty::class: $id = $reflector->class . '::$' . $reflector->name; break; case \ReflectionClassConstant::class: case ReflectionClassConstant::class: // @todo this is going to collide with ReflectionMethod ids // someday... start running the query by id + type if the DB // supports it. $id = $reflector->class . '::' . $reflector->name; break; case ReflectionConstant_::class: $id = $reflector->name; break; default: return false; } return $this->getManualDocById($id); } private function getManualDocById($id) { if ($db = $this->getApplication()->getManualDb()) { return $db ->query(\sprintf('SELECT doc FROM php_manual WHERE id = %s', $db->quote($id))) ->fetchColumn(0); } } }