Skip to content
Snippets Groups Projects

Devel

Merged Piotr Potrebka requested to merge devel into main
5 files
+ 104
103
Compare changes
  • Side-by-side
  • Inline

Files

+ 9
29
@@ -2,55 +2,44 @@
namespace WPDesk\Library\WPEmail\Abstracts;
use WPDesk\View\Renderer\Renderer;
abstract class EmailAbstract implements EmailGettersInterface {
abstract class EmailAbstract implements EmailInterface {
/**
* @var array
*/
private $recipients = [];
protected $recipients = [];
/**
* @var array
*/
private $placeholders = [];
protected $placeholders = [];
/**
* @var string
*/
private $subject = '';
protected $subject = '';
/**
* @var string
*/
private $heading = '';
protected $heading = '';
/**
* @var array
*/
private $attachments = [];
protected $attachments = [];
/**
* @var string
*/
private $content = '';
protected $content = '';
/**
* @var string
*/
private $type = 'text/html';
protected $type = 'text/html';
/**
* @var array
*/
private $headers;
/**
* @var Renderer
*/
private $renderer;
public function __construct( Renderer $renderer ) {
$this->renderer = $renderer;
}
protected $headers;
/**
* Define unique email ID.
@@ -147,13 +136,4 @@ abstract class EmailAbstract implements EmailGettersInterface {
return '';
}
/**
* Get email content.
*
* @return string
*/
public function render(): string {
return $this->renderer->render( dirname( __DIR__ ) . '/html/default.php', [ 'content' => $this->get_content(), 'heading' => $this->get_heading(), 'object' => $this->get_object() ] );
}
}
Loading