Skip to content

Commit

Permalink
set transports with getter/setter
Browse files Browse the repository at this point in the history
  • Loading branch information
cornernote committed Aug 23, 2016
1 parent 3541ca8 commit 1ef5d94
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions email/components/EEmailManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* EEmailManager
*
* @property string $fromName
* @property array $transports
*
* @author Brett O'Donnell <[email protected]>
* @author Zain Ul abidin <[email protected]>
Expand Down Expand Up @@ -85,12 +86,28 @@ class EEmailManager extends CApplicationComponent
* )
* </pre>
*/
public $transports = array(
protected $_transports = array(
'mail' => array(
'class' => 'Swift_MailTransport',
),
);

/**
* @return array
*/
public function getTransports()
{
return $this->_transports;
}

/**
* @param array $transports
*/
public function setTransports($transports)
{
$this->_transports = $transports;
}

/**
*
*/
Expand Down Expand Up @@ -181,17 +198,15 @@ public function deliver($swiftMessage, $transport = null)
if (isset($options['class'])) {
$class = $options['class'];
unset($options['class']);
}
else {
} else {
throw new CException(Yii::t('email', 'Transport :transport does not have a class.', array(':transport' => $transport)));
}

// get transport setters
if (isset($options['setters'])) {
$setters = $options['setters'];
unset($options['setters']);
}
else {
} else {
$setters = array();
}

Expand Down

0 comments on commit 1ef5d94

Please sign in to comment.