AcMailer\Service\MailService::addAttachments PHP Method

addAttachments() public method

public addAttachments ( array $paths )
$paths array
    public function addAttachments(array $paths)
    {
        return $this->setAttachments(array_merge($this->attachments, $paths));
    }

Usage Example

Ejemplo n.º 1
0
 public function testAttachmentsTotal()
 {
     $this->assertCount(0, $this->mailService->getAttachments());
     $this->mailService->setAttachments(array('one', 'two', 'three'));
     $this->mailService->addAttachments(array('four', 'five', 'six'));
     $this->mailService->addAttachment('seven');
     $this->mailService->addAttachment('eight', 'with-alias');
     $this->assertCount(8, $this->mailService->getAttachments());
     $this->mailService->setAttachments(array('one', 'two'));
     $this->assertCount(2, $this->mailService->getAttachments());
     $this->mailService->addAttachments(array('three', 'four'));
     $this->assertCount(4, $this->mailService->getAttachments());
 }
All Usage Examples Of AcMailer\Service\MailService::addAttachments