SpoolTransport.php 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /*
  3. * This file is part of SwiftMailer.
  4. * (c) 2009 Fabien Potencier <fabien.potencier@gmail.com>
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. /**
  10. * Stores Messages in a queue.
  11. *
  12. * @package Swift
  13. * @author Fabien Potencier
  14. */
  15. class Swift_SpoolTransport extends Swift_Transport_SpoolTransport
  16. {
  17. /**
  18. * Create a new SpoolTransport.
  19. *
  20. * @param Swift_Spool $spool
  21. */
  22. public function __construct(Swift_Spool $spool)
  23. {
  24. $arguments = Swift_DependencyContainer::getInstance()
  25. ->createDependenciesFor('transport.spool');
  26. $arguments[] = $spool;
  27. call_user_func_array(
  28. array($this, 'Swift_Transport_SpoolTransport::__construct'),
  29. $arguments
  30. );
  31. }
  32. /**
  33. * Create a new SpoolTransport instance.
  34. *
  35. * @param Swift_Spool $spool
  36. *
  37. * @return Swift_SpoolTransport
  38. */
  39. public static function newInstance(Swift_Spool $spool)
  40. {
  41. return new self($spool);
  42. }
  43. }