Swift_SpoolTransport::__construct PHP Method

__construct() public method

Create a new SpoolTransport.
public __construct ( Swift_Spool $spool )
$spool Swift_Spool
    public function __construct(Swift_Spool $spool)
    {
        $arguments = Swift_DependencyContainer::getInstance()->createDependenciesFor('transport.spool');
        $arguments[] = $spool;
        call_user_func_array(array($this, 'Swift_Transport_SpoolTransport::__construct'), $arguments);
    }

Usage Example

 /**
  * Constructor.
  *
  * @param array $configuration System mail configuration.
  */
 public function __construct(array $configuration)
 {
     $this->configuration = $configuration;
     $spool = $this->getSpoolFactory()->get($configuration);
     parent::__construct($spool);
 }
Swift_SpoolTransport