doctrine.php 2.9 KB

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