getEnvironment(); $app = $this->getApplication(); /** @var SparkApplication $app */ $resources = $app->getResourceManager(); $types = $resources->getAllResourceTypes(); $named = $resources->getAllNamedResources(); $output->writeln("Resource Types:"); $table = new Table($output); $table->setStyle("compact"); $table->setHeaders([ "Type", "Class" ]); $table->setColumnWidth(0, 10); $map = []; foreach ($types as $type=>$class) { $map[$class] = $type; $table->addRow([ $type, $class ]); } $table->render(); $output->writeln(""); $output->writeln("Named Resources:"); $table = new Table($output); $table->setStyle("compact"); $table->setHeaders([ "Name", "Type", "Info" ]); $table->setColumnWidth(0, 10); $table->setColumnWidth(1, 6); foreach ($named as $name=>$class) { $table->addRow([ $name, $map[get_class($class)], $class->info() ]); } $table->render(); return Command::SUCCESS; } }