PHPMailerProxy.php
41 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Matomo - free/libre analytics platform |
| 4 | * |
| 5 | * @link https://matomo.org |
| 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later |
| 7 | * @package matomo |
| 8 | */ |
| 9 | |
| 10 | namespace WpMatomo\Workarounds\FluentSmtp; |
| 11 | |
| 12 | class PHPMailerProxy { |
| 13 | private $wrapped; |
| 14 | |
| 15 | public function __construct( $phpmailer ) { |
| 16 | $this->wrapped = $phpmailer; |
| 17 | } |
| 18 | |
| 19 | // @codingStandardsIgnoreStart |
| 20 | |
| 21 | public function __get( $name ) |
| 22 | { |
| 23 | return $this->wrapped->$name; |
| 24 | } |
| 25 | |
| 26 | public function __set( $name, $value ) |
| 27 | { |
| 28 | $this->wrapped->$name = $value; |
| 29 | } |
| 30 | |
| 31 | public function __call( $name , $arguments ) { |
| 32 | if ( $name == 'addAttachment' ) { |
| 33 | return; |
| 34 | } |
| 35 | |
| 36 | return call_user_func_array([$this->wrapped, $name], $arguments); |
| 37 | } |
| 38 | |
| 39 | // @codingStandardsIgnoreEnd |
| 40 | } |
| 41 |