GearmanBundle.php 750 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Gearman Bundle for Symfony2
  4. *
  5. * @author Marc Morera <yuhu@mmoreram.com>
  6. * @since 2013
  7. */
  8. namespace Mmoreram\GearmanBundle;
  9. use Symfony\Component\HttpKernel\Bundle\Bundle;
  10. use Doctrine\Common\Annotations\AnnotationRegistry;
  11. /**
  12. * Gearman Bundle
  13. *
  14. * @author Marc Morera <yuhu@mmoreram.com>
  15. */
  16. class GearmanBundle extends Bundle
  17. {
  18. /**
  19. * Boots the Bundle.
  20. */
  21. public function boot()
  22. {
  23. $kernel = $this->container->get('kernel');
  24. AnnotationRegistry::registerFile($kernel
  25. ->locateResource("@GearmanBundle/Driver/Gearman/Work.php")
  26. );
  27. AnnotationRegistry::registerFile($kernel
  28. ->locateResource("@GearmanBundle/Driver/Gearman/Job.php")
  29. );
  30. }
  31. }