-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
308e73f
commit 56e257e
Showing
1 changed file
with
54 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
namespace Illuminate\Mail; | ||
|
||
use Illuminate\Support\Traits\ForwardsCalls; | ||
use Symfony\Component\Mailer\SentMessage as SymfonySentMessage; | ||
|
||
/** | ||
* @mixin \Symfony\Component\Mailer\SentMessage | ||
*/ | ||
class SentMessage | ||
{ | ||
use ForwardsCalls; | ||
|
||
/** | ||
* The Symfony SentMessage instance. | ||
* | ||
* @var \Symfony\Component\Mailer\SentMessage | ||
*/ | ||
protected $sentMessage; | ||
|
||
/** | ||
* Create a new SentMessage instance. | ||
* | ||
* @param \Symfony\Component\Mailer\SentMessage $sentMessage | ||
* @return void | ||
*/ | ||
public function __construct(SymfonySentMessage $sentMessage) | ||
{ | ||
$this->sentMessage = $sentMessage; | ||
} | ||
|
||
/** | ||
* Get the underlying Symfony Email instance. | ||
* | ||
* @return \Symfony\Component\Mailer\SentMessage | ||
*/ | ||
public function getSymfonySentMessage() | ||
{ | ||
return $this->sentMessage; | ||
} | ||
|
||
/** | ||
* Dynamically pass missing methods to the Symfony instance. | ||
* | ||
* @param string $method | ||
* @param array $parameters | ||
* @return mixed | ||
*/ | ||
public function __call($method, $parameters) | ||
{ | ||
return $this->forwardCallTo($this->sentMessage, $method, $parameters); | ||
} | ||
} |