From de26531178c61c98dcb7b7634c9e5891c302f615 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Thu, 15 Aug 2019 17:19:12 +0200 Subject: tec: Provide a Minz_Mailer class (#2476) * Add Minz_View::_path method (replace change_view) The `_path` method is more powerful since it allows to choose the file extension. It is also Minz_Request-agnostic, which is useful to reuse the Minz_View class in other places. `change_view` is now deprecated and a warning is logged if we use it. * Provide a Minz_Mailer to send emails It uses PHPMailer under the hood and only supports PHP >= 5.5 --- lib/Minz/ActionController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Minz/ActionController.php') diff --git a/lib/Minz/ActionController.php b/lib/Minz/ActionController.php index 232a4ef9b..123b9054c 100644 --- a/lib/Minz/ActionController.php +++ b/lib/Minz/ActionController.php @@ -14,7 +14,9 @@ class Minz_ActionController { * Constructeur */ public function __construct () { - $this->view = new Minz_View (); + $this->view = new Minz_View(); + $view_path = Minz_Request::controllerName() . '/' . Minz_Request::actionName() . '.phtml'; + $this->view->_path($view_path); $this->view->attributeParams (); } -- cgit v1.2.3