dependencies.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php namespace Laravel\CLI; use Laravel\IoC;
  2. /**
  3. * The migrate task is responsible for running database migrations
  4. * as well as migration rollbacks. We will also create an instance
  5. * of the migration resolver and database classes, which are used
  6. * to perform various support functions for the migrator.
  7. */
  8. IoC::register('task: migrate', function()
  9. {
  10. $database = new Tasks\Migrate\Database;
  11. $resolver = new Tasks\Migrate\Resolver($database);
  12. return new Tasks\Migrate\Migrator($resolver, $database);
  13. });
  14. /**
  15. * The bundle task is responsible for the installation of bundles
  16. * and their dependencies. It utilizes the bundles API to get the
  17. * meta-data for the available bundles.
  18. */
  19. IoC::register('task: bundle', function()
  20. {
  21. return new Tasks\Bundle\Bundler;
  22. });
  23. /**
  24. * The bundle repository is responsible for communicating with
  25. * the Laravel bundle sources to get information regarding any
  26. * bundles that are requested for installation.
  27. */
  28. IoC::singleton('bundle.repository', function()
  29. {
  30. return new Tasks\Bundle\Repository;
  31. });
  32. /**
  33. * The bundle publisher is responsible for publishing bundle
  34. * assets and tests to their correct directories within the
  35. * application, such as the web accessible directory.
  36. */
  37. IoC::singleton('bundle.publisher', function()
  38. {
  39. return new Tasks\Bundle\Publisher;
  40. });
  41. /**
  42. * The Github bundle provider installs bundles that live on
  43. * Github. This provider will add the bundle as a submodule
  44. * and will update the submodule so that the bundle is
  45. * installed into the bundle directory.
  46. */
  47. IoC::singleton('bundle.provider: github', function()
  48. {
  49. return new Tasks\Bundle\Providers\Github;
  50. });