1: <?php
2:
3: /*
4: * This file is part of SwiftMailer.
5: * (c) 2004-2009 Chris Corbyn
6: *
7: * For the full copyright and license information, please view the LICENSE
8: * file that was distributed with this source code.
9: */
10:
11: /**
12: * Redudantly and rotationally uses several Transport implementations when sending.
13: * @package Swift
14: * @subpackage Transport
15: * @author Chris Corbyn
16: */
17: class Swift_LoadBalancedTransport extends Swift_Transport_LoadBalancedTransport
18: {
19: /**
20: * Creates a new LoadBalancedTransport with $transports.
21: * @param array $transports
22: */
23: public function __construct($transports = array())
24: {
25: call_user_func_array(
26: array($this, 'Swift_Transport_LoadBalancedTransport::__construct'),
27: Swift_DependencyContainer::getInstance()
28: ->createDependenciesFor('transport.loadbalanced')
29: );
30:
31: $this->setTransports($transports);
32: }
33:
34: /**
35: * Create a new LoadBalancedTransport instance.
36: * @param string $transports
37: * @return Swift_LoadBalancedTransport
38: */
39: public static function newInstance($transports = array())
40: {
41: return new self($transports);
42: }
43: }
44: