dependencies.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 "test" task is responsible for running the unit tests for
  44. * the application, bundles, and the core framework itself.
  45. * It provides a nice wrapper around PHPUnit.
  46. */
  47. IoC::singleton('task: test', function()
  48. {
  49. return new Tasks\Test\Runner;
  50. });
  51. /**
  52. * The bundle repository is responsible for communicating with
  53. * the Laravel bundle sources to get information regarding any
  54. * bundles that are requested for installation.
  55. */
  56. IoC::singleton('bundle.repository', function()
  57. {
  58. return new Tasks\Bundle\Repository;
  59. });
  60. /**
  61. * The bundle publisher is responsible for publishing bundle
  62. * assets to their correct directories within the install,
  63. * such as the web accessible directory.
  64. */
  65. IoC::singleton('bundle.publisher', function()
  66. {
  67. return new Tasks\Bundle\Publisher;
  68. });
  69. /**
  70. * The Github bundle provider installs bundles that live on
  71. * Github. This provider will add the bundle as a submodule
  72. * and will update the submodule so that the bundle is
  73. * installed into the bundle directory.
  74. */
  75. IoC::singleton('bundle.provider: github', function()
  76. {
  77. return new Tasks\Bundle\Providers\Github;
  78. });