当前位置: 首页>>代码示例>>PHP>>正文


PHP Application::setCatchExceptions方法代码示例

本文整理汇总了PHP中Symfony\Component\Console\Application::setCatchExceptions方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::setCatchExceptions方法的具体用法?PHP Application::setCatchExceptions怎么用?PHP Application::setCatchExceptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\Console\Application的用法示例。


在下文中一共展示了Application::setCatchExceptions方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setupConsoleApplication

 /**
  * Setup symfonys consoles application
  * 
  * @return ConsoleApplication
  */
 public function setupConsoleApplication()
 {
     $this->consoleApplication = new ConsoleApplication();
     $this->consoleApplication->setCatchExceptions(false);
     $this->setupConsoleCommands();
     return $this->consoleApplication;
 }
开发者ID:staffanselander,项目名称:RestaurangOnlineDevelopmentConsole,代码行数:12,代码来源:Application.php

示例2: ormCommands

 /**
  * @param $orm
  */
 public function ormCommands($orm)
 {
     if (is_array($orm) && in_array('doctrine', $orm)) {
         /** @var EntityManager $em */
         $em = Model::orm('doctrine')->getOrm();
         $helperSet = ConsoleRunner::createHelperSet($em);
         $this->cli->setCatchExceptions(true);
         $this->cli->setHelperSet($helperSet);
         ConsoleRunner::addCommands($this->cli);
     }
 }
开发者ID:jetfirephp,项目名称:framework,代码行数:14,代码来源:ConsoleProvider.php

示例3: createConsole

 /**
  * Creates console.
  *
  * @param HelperSet $helperSet
  * @param \Symfony\Component\Console\Command\Command[] $commands
  * @return Application
  */
 public function createConsole(HelperSet $helperSet, array $commands)
 {
     $cli = new Application($this->getName(), $this->getVersion());
     $cli->setCatchExceptions(true);
     $cli->setHelperSet($helperSet);
     $cli->addCommands($commands);
     return $cli;
 }
开发者ID:raphhh,项目名称:pinguin,代码行数:15,代码来源:ConsoleHelper.php

示例4: run

 /**
  * Run console with the given helperset.
  *
  * @param \Symfony\Component\Console\Helper\HelperSet $helperSet
  * @return void
  */
 public static function run(HelperSet $helperSet)
 {
     $cli = new Application('Propel Command Line Tool', \PropelCli\Version::VERSION);
     $cli->setCatchExceptions(true);
     $cli->setHelperSet($helperSet);
     self::addCommands($cli);
     $cli->run();
 }
开发者ID:chriswoodford,项目名称:propel-cli,代码行数:14,代码来源:ConsoleRunner.php

示例5: run

 /**
  * Run console with the given helperset.
  *
  * @param \Symfony\Component\Console\Helper\HelperSet $helperSet
  * @return void
  */
 public static function run(HelperSet $helperSet)
 {
     $cli = new Application('Doctrine Command Line Interface', \Doctrine\ORM\Version::VERSION);
     $cli->setCatchExceptions(true);
     $cli->setHelperSet($helperSet);
     self::addCommands($cli);
     $cli->run();
 }
开发者ID:pabloasc,项目名称:test_social,代码行数:14,代码来源:ConsoleRunner.php

示例6: run

 public function run($config)
 {
     $cli = new Application('Schema Roller', Version::VERSION);
     $cli->setCatchExceptions(true);
     self::addHelperSets($cli, $config);
     self::addCommands($cli);
     $cli->run();
 }
开发者ID:scottasmith,项目名称:schemaroller,代码行数:8,代码来源:ConsoleHelper.php

示例7: run

 /**
  * @param HelperSet $helperSet
  * @param array $commands
  */
 public static function run(HelperSet $helperSet, $commands = array())
 {
     $cli = new \Symfony\Component\Console\Application('Malocher EventStore CLI', self::VERSION);
     $cli->setHelperSet($helperSet);
     $cli->setCatchExceptions(true);
     self::addCommands($cli);
     $cli->run();
 }
开发者ID:malocher,项目名称:event-store,代码行数:12,代码来源:ConsoleRunner.php

示例8: run

 /**
  * Run console with the given helperset.
  *
  * @param \Symfony\Component\Console\Helper\HelperSet $helperSet
  * @param \Symfony\Component\Console\Command\Command[] $commands 
  * @return void
  */
 public static function run($commands = array())
 {
     $cli = new Application('Doctrine to XSD Command Line Interface', "1.0");
     $cli->setCatchExceptions(true);
     self::addCommands($cli);
     $cli->addCommands($commands);
     $cli->run();
 }
开发者ID:goetas,项目名称:doctrine2xsd,代码行数:15,代码来源:ConsoleRunner.php

示例9: createApplication

 /**
  * Creates a console application with the given helperset and
  * optional commands.
  *
  * @param \Symfony\Component\Console\Helper\HelperSet $helperSet
  * @param array $commands
  *
  * @return \Symfony\Component\Console\Application
  */
 public static function createApplication(HelperSet $helperSet, $commands = array())
 {
     $cli = new Application('Doctrine Command Line Interface', Version::VERSION);
     $cli->setCatchExceptions(true);
     $cli->setHelperSet($helperSet);
     self::addCommands($cli);
     $cli->addCommands($commands);
     return $cli;
 }
开发者ID:BusinessCookies,项目名称:CoffeeMachineProject,代码行数:18,代码来源:ConsoleRunner.php

示例10: run

 /**
  * Runs console with the given helperset.
  *
  * @param HelperSet                                    $helperSet
  * @param \Symfony\Component\Console\Command\Command[] $commands
  *
  * @return void
  */
 public static function run(HelperSet $helperSet, $commands = array())
 {
     $cli = new Application('PoolDBM Command Line Interface', Version::VERSION);
     $cli->setCatchExceptions(true);
     $cli->setHelperSet(new HelperSet($helperSet));
     self::addDefaultCommands($cli);
     $cli->addCommands($commands);
     $cli->run();
 }
开发者ID:pokap,项目名称:pool-dbm,代码行数:17,代码来源:ConsoleRunner.php

示例11: createApplication

 /**
  * Creates a console application with the given helperset and
  * optional commands.
  *
  * @param \Symfony\Component\Console\Helper\HelperSet $helperSet
  * @param array $commands
  *
  * @return \Symfony\Component\Console\Application
  */
 public static function createApplication(HelperSet $helperSet, $commands = [])
 {
     $cli = new Application('Doctrine Migrations', MigrationsVersion::VERSION());
     $cli->setCatchExceptions(true);
     $cli->setHelperSet($helperSet);
     self::addCommands($cli);
     $cli->addCommands($commands);
     return $cli;
 }
开发者ID:doctrine,项目名称:migrations,代码行数:18,代码来源:ConsoleRunner.php

示例12: createApplication

 /**
  * Creates a console application with the given helperset and
  * optional commands.
  *
  * @param HelperSet $helperSet
  * @param \Symfony\Component\Console\Command\Command[] $commands
  *
  * @return Application
  */
 public static function createApplication(HelperSet $helperSet, $commands = [])
 {
     $cli = new Application('Humus Amqp Command Line Interface');
     $cli->setCatchExceptions(true);
     $cli->setHelperSet($helperSet);
     self::addCommands($cli);
     $cli->addCommands($commands);
     return $cli;
 }
开发者ID:prolic,项目名称:HumusAmqp,代码行数:18,代码来源:ConsoleRunner.php

示例13: register

 /**
  * {@inheritDoc}
  */
 public function register(Application $app)
 {
     $app['console'] = $app->share(function ($app) {
         $consoleApp = new ConsoleApplication();
         // disable swallowing exceptions so they actually get pushed to the logger
         $consoleApp->setCatchExceptions(false);
         return $consoleApp;
     });
 }
开发者ID:bodetree,项目名称:synapse-base,代码行数:12,代码来源:CommandServiceProvider.php

示例14: run

 /**
  * Runs console with the given helperset.
  *
  * @param \Symfony\Component\Console\Helper\HelperSet  $helperSet
  * @param \Symfony\Component\Console\Command\Command[] $commands
  *
  * @return void
  */
 public static function run(HelperSet $helperSet, $commands = array(), OutputInterface $output = null)
 {
     $cli = new Application('Doctrine Command Line Interface', Version::VERSION);
     $cli->setCatchExceptions(true);
     $cli->setHelperSet($helperSet);
     $cli->setAutoExit(false);
     $commands = array_merge(self::getDefaultCommands(), $commands);
     $cli->addCommands($commands);
     $cli->run(null, $output);
 }
开发者ID:useallfive,项目名称:doctrine-web-console,代码行数:18,代码来源:ConsoleRunner.php

示例15: __invoke

 /**
  * {@inheritDoc}
  * @return Application
  */
 public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
 {
     $cli = new Application();
     $cli->setName('DoctrineModule Command Line Interface');
     $cli->setVersion(Version::VERSION);
     $cli->setHelperSet(new HelperSet());
     $cli->setCatchExceptions(true);
     $cli->setAutoExit(false);
     // Load commands using event
     $this->getEventManager($container)->trigger('loadCli.post', $cli, array('ServiceManager' => $container));
     return $cli;
 }
开发者ID:TomHAnderson,项目名称:DoctrineModule,代码行数:16,代码来源:CliFactory.php


注:本文中的Symfony\Component\Console\Application::setCatchExceptions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。