本文整理汇总了PHP中Symfony\Bundle\FrameworkBundle\Console\Application::setAutoExit方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::setAutoExit方法的具体用法?PHP Application::setAutoExit怎么用?PHP Application::setAutoExit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Bundle\FrameworkBundle\Console\Application
的用法示例。
在下文中一共展示了Application::setAutoExit方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
/**
* Set up test
*/
public function setUp()
{
static::$kernel = static::createKernel();
static::$kernel->boot();
static::$application = new Application(static::$kernel);
static::$application->setAutoExit(false);
}
示例2: setUp
protected function setUp()
{
$kernel = new TestKernel('test', true);
$kernel->boot();
$this->application = new Application($kernel);
// Without this, the application will call the PHP exit() function
$this->application->setAutoExit(false);
}
示例3: setUp
protected function setUp()
{
self::bootKernel();
$this->application = new Application(self::$kernel);
$this->application->setAutoExit(false);
$this->runConsole("doctrine:schema:drop", ["--force" => true]);
$this->runConsole("doctrine:schema:create");
}
示例4: setUp
public function setUp()
{
$this->client = $this->createClient();
$this->app = new Application($this->client->getKernel());
$this->app->setAutoExit(false);
$this->em = static::$kernel->getContainer()->get('doctrine')->getManager();
$this->router = static::$kernel->getContainer()->get('router');
}
示例5: setUp
protected function setUp()
{
$this->bootKernel();
$this->application = new Application(self::$kernel);
$this->application->setAutoExit(false);
$this->runCommand('doctrine:schema:drop --force');
$this->runCommand('doctrine:schema:create');
}
示例6: getApplication
/**
* @return Application
*/
protected function getApplication()
{
if (!$this->application) {
$this->application = new Application($this->get('kernel'));
$this->application->setAutoExit(false);
}
return $this->application;
}
示例7: setUp
/**
* {@inheritDoc}
*/
public function setUp()
{
self::bootKernel();
$this->container = static::$kernel->getContainer();
$this->application = new Application(static::$kernel);
$this->application->setAutoExit(false);
$this->application->setCatchExceptions(false);
}
示例8: initialize
/**
* @param InputInterface $input
* @param OutputInterface $output
*/
protected function initialize(InputInterface $input, OutputInterface $output)
{
$this->io = new SymfonyStyle($input, $output);
$this->container = $this->getContainer();
$this->apiViews = $this->container->get('ojs_api.twig.api_extension')->getApiViews();
$this->kernel = $this->container->get('kernel');
$this->application = new Application($this->kernel);
$this->application->setAutoExit(false);
}
示例9: setUp
/**
* {@inheritDoc}
*/
public function setUp()
{
self::bootKernel();
$this->container = static::$kernel->getContainer();
$this->application = new Application(static::$kernel);
$this->application->setAutoExit(false);
$this->application->setCatchExceptions(false);
$this->function_exists = $this->getFunctionMock('Abc\\ProcessControl', 'function_exists');
}
示例10: runCommand
private static function runCommand($commandName, $options = array())
{
$options["-e"] = self::$kernel->getEnvironment();
$options['command'] = $commandName;
$input = new ArrayInput($options);
$output = new NullOutput();
static::$application->setAutoExit(false);
self::$application->run($input, $output);
}
示例11: getApplication
/**
* @return App
*/
protected static function getApplication()
{
if (null === self::$application) {
$client = static::createClient();
self::$application = new App($client->getKernel());
self::$application->setAutoExit(false);
}
return self::$application;
}
示例12: setUp
/**
* {@inheritDoc}
*/
protected function setUp()
{
$this->logger = $this->getMock('Symfony\\Bridge\\Monolog\\Logger', ['log'], ['name' => 'console.chain']);
$kernel = new \AppKernel('test', false);
$this->application = new Application($kernel);
$this->application->setAutoExit(false);
$kernel->boot();
$kernel->getContainer()->set('chain_command.logger', $this->logger);
}
示例13: setupSubject
/**
* @before
*/
public function setupSubject()
{
$this->supervisorManager = $this->getMockBuilder('YZ\\SupervisorBundle\\Manager\\SupervisorManager')->disableOriginalConstructor()->getMock();
self::bootKernel();
static::$kernel->getContainer()->set('supervisor.manager', $this->supervisorManager);
$this->application = new Application(static::$kernel);
$this->application->setAutoExit(false);
$this->application->setCatchExceptions(false);
}
示例14: getApplication
protected static function getApplication()
{
if (null === self::$application) {
$client = static::createClient();
self::$application = new \Symfony\Bundle\FrameworkBundle\Console\Application($client->getKernel());
self::$application->setAutoExit(false);
}
return self::$application;
}
示例15: getApplication
/**
* @return Application
*/
private static function getApplication()
{
if (null === self::$application) {
self::$client = static::createClient();
self::$application = new Application(self::$kernel);
self::$application->setAutoExit(false);
}
return self::$application;
}