本文整理匯總了PHP中Symfony\Component\Console\Output\ConsoleOutput::setVerbosity方法的典型用法代碼示例。如果您正苦於以下問題:PHP ConsoleOutput::setVerbosity方法的具體用法?PHP ConsoleOutput::setVerbosity怎麽用?PHP ConsoleOutput::setVerbosity使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Symfony\Component\Console\Output\ConsoleOutput
的用法示例。
在下文中一共展示了ConsoleOutput::setVerbosity方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: run_install
public function run_install()
{
ob_start();
$input = new ArgvInput(array());
$output = new ConsoleOutput();
$helper = new HelperSet();
$config = new Config();
$output->setVerbosity(0);
$io = new ConsoleIO($input, $output, $helper);
$composer = Factory::create($io);
$composer->setConfig($config);
$update = new InstallCommand();
$update->setComposer($composer);
$out = $update->run($input, $output);
ob_end_clean();
return $out;
}
示例2: doAssetsDump
/**
* @param InputInterface $input
* @param OutputInterface $output
*/
private function doAssetsDump(InputInterface $input, OutputInterface $output)
{
$silentOutput = new ConsoleOutput();
$silentOutput->setVerbosity(OutputInterface::VERBOSITY_QUIET);
$output->write('<info>Dumping exposed routes...</info> ');
$this->runCommand('fos:js-routing:dump', $input, $silentOutput);
$output->writeln('OK');
$output->write('<info>Dumping assets...</info> ');
$this->runCommand('assetic:dump', $input, $silentOutput);
$output->writeln('OK');
}
示例3: dirname
<?php
/**
* @author Oliver Lorenz <oliver.lorenz@project-collins.com>
* @since 2014-10-18
*/
require_once dirname(__FILE__) . "/vendor/autoload.php";
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Config\FileLocator;
// mock the Kernel or create one depending on your needs
try {
$application = new Application();
$output = new ConsoleOutput();
$output->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
$application->add(new \command\TaskCreate());
$application->add(new \command\TaskMove());
$application->run(null, $output);
} catch (\Exception $exception) {
throw $exception;
//
}