doctrine.php 2.8 KB

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