dependencies.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 key task is responsible for generating a secure, random
  25. * key for use by the application when encrypting strings or
  26. * setting the hash values on cookie signatures.
  27. */
  28. IoC::singleton('task: key', function()
  29. {
  30. return new Tasks\Key;
  31. });
  32. /**
  33. * The session task is responsible for performing tasks related
  34. * to the session store of the application. It can do things
  35. * such as generating the session table or clearing expired
  36. * sessions from storage.
  37. */
  38. IoC::singleton('task: session', function()
  39. {
  40. return new Tasks\Session\Manager;
  41. });
  42. /**
  43. * The bundle repository is responsible for communicating with
  44. * the Laravel bundle sources to get information regarding any
  45. * bundles that are requested for installation.
  46. */
  47. IoC::singleton('bundle.repository', function()
  48. {
  49. return new Tasks\Bundle\Repository;
  50. });
  51. /**
  52. * The bundle publisher is responsible for publishing bundle
  53. * assets and tests to their correct directories within the
  54. * application, such as the web accessible directory.
  55. */
  56. IoC::singleton('bundle.publisher', function()
  57. {
  58. return new Tasks\Bundle\Publisher;
  59. });
  60. /**
  61. * The Github bundle provider installs bundles that live on
  62. * Github. This provider will add the bundle as a submodule
  63. * and will update the submodule so that the bundle is
  64. * installed into the bundle directory.
  65. */
  66. IoC::singleton('bundle.provider: github', function()
  67. {
  68. return new Tasks\Bundle\Providers\Github;
  69. });