console.php 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/usr/bin/env php
  2. <?php
  3. set_time_limit(0);
  4. require_once dirname(__FILE__).'/../main/inc/global.inc.php';
  5. // Variable $helperSet is defined inside cli-config.php
  6. require __DIR__ . '/config/console-config.php';
  7. //$cli = new \Symfony\Component\Console\Application('Doctrine Command Line Interface', Doctrine\Common\Version::VERSION);
  8. $cli = new \Symfony\Component\Console\Application('Chamilo Command Line Interface');
  9. $cli->setCatchExceptions(true);
  10. $helperSet = $cli->getHelperSet();
  11. foreach ($helpers as $name => $helper) {
  12. $helperSet->set($helper, $name);
  13. }
  14. $cli->addCommands(array(
  15. // DBAL Commands
  16. new \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand(),
  17. new \Doctrine\DBAL\Tools\Console\Command\ImportCommand(),
  18. // ORM Commands
  19. new \Doctrine\ORM\Tools\Console\Command\ClearCache\MetadataCommand(),
  20. new \Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand(),
  21. new \Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand(),
  22. new \Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand(),
  23. new \Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand(),
  24. new \Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand(),
  25. new \Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand(),
  26. new \Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand(),
  27. new \Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand(),
  28. new \Doctrine\ORM\Tools\Console\Command\GenerateEntitiesCommand(),
  29. new \Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand(),
  30. new \Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand(),
  31. new \Doctrine\ORM\Tools\Console\Command\RunDqlCommand(),
  32. new \Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand(),
  33. // Migrations Commands
  34. new \Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand(),
  35. new \Doctrine\DBAL\Migrations\Tools\Console\Command\ExecuteCommand(),
  36. new \Doctrine\DBAL\Migrations\Tools\Console\Command\GenerateCommand(),
  37. new \Doctrine\DBAL\Migrations\Tools\Console\Command\MigrateCommand(),
  38. new \Doctrine\DBAL\Migrations\Tools\Console\Command\StatusCommand(),
  39. new \Doctrine\DBAL\Migrations\Tools\Console\Command\VersionCommand(),
  40. //Chamilo commands
  41. new ChamiloLMS\Command\Database\UpgradeCommand(),
  42. new ChamiloLMS\Command\Database\InstallCommand(),
  43. new ChamiloLMS\Command\Database\StatusCommand(),
  44. new ChamiloLMS\Command\Database\SetupCommand(),
  45. //Chash commands
  46. new Chash\Command\Database\RunSQLCommand(),
  47. new Chash\Command\Database\DumpCommand(),
  48. new Chash\Command\Database\RestoreCommand(),
  49. new Chash\Command\Database\SQLCountCommand(),
  50. new Chash\Command\Database\FullBackupCommand(),
  51. new Chash\Command\Database\DropDatabaseCommand(),
  52. new Chash\Command\Files\CleanTempFolderCommand(),
  53. new Chash\Command\Files\CleanConfigFiles(),
  54. new Chash\Command\Translation\ExportLanguageCommand(),
  55. new Chash\Command\Translation\ImportLanguageCommand()
  56. ));
  57. $cli->run();