-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from eileenmcnaughton/mass_mailing
Add mass mailing functions.
- Loading branch information
Showing
9 changed files
with
700 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
/** | ||
* Created by IntelliJ IDEA. | ||
* User: emcnaughton | ||
* Date: 6/21/17 | ||
* Time: 11:30 AM | ||
*/ | ||
|
||
namespace Omnimail\Common; | ||
|
||
/** | ||
* Class Credentials | ||
* | ||
* Object for storing credentials. This is excluded from debug output for privacy. | ||
* | ||
* This class has some further ideas for protecting data | ||
* | ||
* https://github.com/Payum/Payum/blob/master/src/Payum/Core/Security/SensitiveValue.php | ||
* | ||
* @package Omnimail\Common | ||
*/ | ||
class Credentials implements CredentialsInterface | ||
{ | ||
private $credentials = array(); | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function getCredentials() | ||
{ | ||
return $this->credentials; | ||
} | ||
|
||
/** | ||
* @param array $credentials | ||
*/ | ||
public function setCredentials($credentials) | ||
{ | ||
$this->credentials = $credentials; | ||
} | ||
|
||
public function __construct($credentials) | ||
{ | ||
$this->credentials = $credentials; | ||
} | ||
|
||
/** | ||
* Get a single credential parameter. | ||
* | ||
* @param string $parameter | ||
* @return mixed|null | ||
*/ | ||
public function get($parameter) | ||
{ | ||
return isset($this->credentials[$parameter]) ? $this->credentials[$parameter] : null; | ||
} | ||
|
||
/** | ||
* Magic method http://php.net/manual/en/language.oop5.magic.php#object.debuginfo | ||
* | ||
* We override this to ensure that the credentials are | ||
* excluded from var_dump. | ||
*/ | ||
public function __debugInfo() | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* Created by IntelliJ IDEA. | ||
* User: emcnaughton | ||
* Date: 5/4/17 | ||
* Time: 10:35 AM | ||
*/ | ||
|
||
namespace Omnimail\Common; | ||
|
||
/** | ||
* Interface CredentialsInterface | ||
* | ||
* @package Omnimail | ||
*/ | ||
interface CredentialsInterface | ||
{ | ||
/** | ||
* Set credentials. | ||
* | ||
* @param array $credentials | ||
*/ | ||
public function setCredentials($credentials); | ||
|
||
/** | ||
* @param $parameter | ||
* @return mixed | ||
*/ | ||
public function get($parameter); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.