當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。