AbstractGearmanClientTaskEvent.php 983 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * Gearman Bundle for Symfony2
  4. *
  5. * For the full copyright and license information, please view the LICENSE
  6. * file that was distributed with this source code.
  7. *
  8. * Feel free to edit as you please, and have fun.
  9. *
  10. * @author Marc Morera <yuhu@mmoreram.com>
  11. */
  12. namespace Mmoreram\GearmanBundle\Event\Abstracts;
  13. use Symfony\Component\EventDispatcher\Event;
  14. use GearmanTask;
  15. /**
  16. * AbstractGearmanClientTaskEvent
  17. */
  18. abstract class AbstractGearmanClientTaskEvent extends Event
  19. {
  20. /**
  21. * @var GearmanTask
  22. *
  23. * Gearman task object
  24. */
  25. protected $gearmanTask;
  26. /**
  27. * Construct method
  28. *
  29. * @param GearmanTask $gearmanTask Gearman Task
  30. */
  31. public function __construct(GearmanTask $gearmanTask)
  32. {
  33. $this->gearmanTask = $gearmanTask;
  34. }
  35. /**
  36. * Get Gearman Task
  37. *
  38. * @return GearmanTask Gearman Task
  39. */
  40. public function getGearmanTask()
  41. {
  42. return $this->gearmanTask;
  43. }
  44. }