SpoolTransport.php 1002B

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