/** * @param $receiver * @param $password */ public function __construct($receiver, $password) { parent::__construct(); $this->_receiver = $receiver; $this->assign("name", $receiver["name"]); $this->assign('password', $password); $this->show(); }
/** * @param array $receiver * @param array $data */ public function __construct(array $receiver, array $data) { parent::__construct(); $this->_receiver = $receiver; $this->_subject = $data['message']; $this->assign("message", $data['message']); $this->show(); }
/** * @param $receiver * @param $registerSalt */ public function __construct($receiver, $registerSalt) { parent::__construct(); $this->_receiver = $receiver; $this->assign("name", $receiver["name"]); $this->assign('registerSalt', $registerSalt); $this->show(); }
/** * @param array $receiver * @param array $content * @param array $cc * @throws \Exception */ public function __construct(array $receiver = [], array $content = [], array $cc = []) { parent::__construct(); if (empty($receiver)) { $settings = Cunity::get("settings"); $receiver = ["email" => $settings->getSetting("core.contact_mail"), "name" => "Cunity Administrator"]; } $this->_receiver = $receiver; $this->_cc = $cc; $this->_subject = $content['subject']; $this->assign('message', $content['message']); $this->show(); }
/** * @param $receiver * @param array $text */ public function __construct($receiver, array $text) { parent::__construct(); if ((!isset($receiver['name']) || !isset($receiver['email'])) && isset($receiver['userid'])) { /** @var User $user */ /** @noinspection PhpUndefinedMethodInspection */ $user = $_SESSION['user']->getTable()->search("userid", $receiver['userid']); if ($user !== null) { $receiver['name'] = $user->name; $receiver['email'] = $user->email; } } $this->_receiver = $receiver; $this->_subject = $this->translate($text['subject']['text']); $this->assign("name", $receiver["name"]); if (isset($text['content'])) { $this->assign("content", $this->translate($text['content']['text'])); } else { $this->assign("content", $this->translate($text['subject']['text'])); } $this->show(); }