SpoolTransport.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. * @author Fabien Potencier
  13. */
  14. class Swift_SpoolTransport extends Swift_Transport_SpoolTransport
  15. {
  16. /**
  17. * Create a new SpoolTransport.
  18. *
  19. * @param Swift_Spool $spool
  20. */
  21. public function __construct(Swift_Spool $spool)
  22. {
  23. $arguments = Swift_DependencyContainer::getInstance()
  24. ->createDependenciesFor('transport.spool');
  25. $arguments[] = $spool;
  26. call_user_func_array(
  27. array($this, 'Swift_Transport_SpoolTransport::__construct'),
  28. $arguments
  29. );
  30. }
  31. /**
  32. * Create a new SpoolTransport instance.
  33. *
  34. * @param Swift_Spool $spool
  35. *
  36. * @return Swift_SpoolTransport
  37. */
  38. public static function newInstance(Swift_Spool $spool)
  39. {
  40. return new self($spool);
  41. }
  42. }