Created
November 3, 2013 20:08
-
-
Save rgranadino/7294237 to your computer and use it in GitHub Desktop.
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
<?php | |
class Email { | |
//... | |
public function setAttachments(array $files) { | |
$this->attachment_list = array(); | |
foreach($files as $filename => $file) { | |
if (is_str($filename)) { | |
$this->addAttachment($file, $filename); | |
} else { | |
$this->addAttachment($file); | |
} | |
} | |
return $this; | |
} | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment