/** * Check for other application requirements before registering * commands * * @see \Ten24\Silex\ConsoleCommandServiceProvider\Command\BaseCommand::registerCommands() * @throws RuntimeException * @throws FileNotFoundException */ protected function registerCommands() { if (!$this->app->offsetExists('assetic')) { throw new \RuntimeException('Cannot register assetic commands; configuration key "assetic" is not set.'); } parent::registerCommands(); }
/** * Check for other application requirements before registering * commands * * @see \Ten24\Silex\ConsoleCommandServiceProvider\Command\BaseCommand::registerCommands() * @throws DBALException * @throws FileNotFoundException */ protected function registerCommands() { if (!$this->app->offsetExists('db')) { throw new DBALException('$app[\'db\'] is not defined.'); } if (!is_readable($this->options['schemaFile']) | !is_file($this->options['schemaFile'])) { throw new FileNotFoundException(sprintf('Cannot locate schema file; looked in "%s".', $this->options['schemaFile'])); } parent::registerCommands(); }