From 4370a91c1def93e2da4f8425e29df6991d3016af Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Mon, 22 Oct 2012 13:49:28 -0400 Subject: [PATCH] Renamed mailer service to VuFind\Mailer. --- module/VuFind/config/module.config.php | 2 +- module/VuFind/src/VuFind/Controller/AbstractRecord.php | 2 +- module/VuFind/src/VuFind/Controller/AjaxController.php | 4 ++-- module/VuFind/src/VuFind/Controller/CartController.php | 2 +- module/VuFind/src/VuFind/Controller/SearchController.php | 2 +- module/VuFind/src/VuFind/Log/Logger.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module/VuFind/config/module.config.php b/module/VuFind/config/module.config.php index ff566995cc2..2c5931de6ca 100644 --- a/module/VuFind/config/module.config.php +++ b/module/VuFind/config/module.config.php @@ -317,7 +317,7 @@ $config = array( 'VuFind\AuthManager' => 'VuFind\Auth\Manager', 'VuFind\Cart' => 'VuFind\Cart', 'VuFind\CacheManager' => 'VuFind\Cache\Manager', - 'mailer' => 'VuFind\Mailer', + 'VuFind\Mailer' => 'VuFind\Mailer', 'recordloader' => 'VuFind\Record\Loader', 'searchspecsreader' => 'VuFind\Config\SearchSpecsReader', 'sessionmanager' => 'Zend\Session\SessionManager', diff --git a/module/VuFind/src/VuFind/Controller/AbstractRecord.php b/module/VuFind/src/VuFind/Controller/AbstractRecord.php index 546f140728c..71cdc03d398 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractRecord.php +++ b/module/VuFind/src/VuFind/Controller/AbstractRecord.php @@ -307,7 +307,7 @@ class AbstractRecord extends AbstractBase // Attempt to send the email and show an appropriate flash message: try { - $this->getServiceLocator()->get('Mailer')->sendRecord( + $this->getServiceLocator()->get('VuFind\Mailer')->sendRecord( $view->to, $view->from, $view->message, $driver, $this->getViewRenderer() ); diff --git a/module/VuFind/src/VuFind/Controller/AjaxController.php b/module/VuFind/src/VuFind/Controller/AjaxController.php index 3069516272f..fb44a00bac1 100644 --- a/module/VuFind/src/VuFind/Controller/AjaxController.php +++ b/module/VuFind/src/VuFind/Controller/AjaxController.php @@ -966,7 +966,7 @@ class AjaxController extends AbstractBase $this->params()->fromPost('id'), $this->params()->fromPost('source', 'VuFind') ); - $this->getServiceLocator()->get('Mailer')->sendRecord( + $this->getServiceLocator()->get('VuFind\Mailer')->sendRecord( $this->params()->fromPost('to'), $this->params()->fromPost('from'), $this->params()->fromPost('message'), $record, $this->getViewRenderer() @@ -998,7 +998,7 @@ class AjaxController extends AbstractBase // Attempt to send the email: try { - $this->getServiceLocator()->get('Mailer')->sendLink( + $this->getServiceLocator()->get('VuFind\Mailer')->sendLink( $this->params()->fromPost('to'), $this->params()->fromPost('from'), $this->params()->fromPost('message'), $url, $this->getViewRenderer(), $this->params()->fromPost('subject') diff --git a/module/VuFind/src/VuFind/Controller/CartController.php b/module/VuFind/src/VuFind/Controller/CartController.php index 6efe3d8f96b..c7bdffa0cd9 100644 --- a/module/VuFind/src/VuFind/Controller/CartController.php +++ b/module/VuFind/src/VuFind/Controller/CartController.php @@ -192,7 +192,7 @@ class CartController extends AbstractBase // Attempt to send the email and show an appropriate flash message: try { // If we got this far, we're ready to send the email: - $this->getServiceLocator()->get('Mailer')->sendLink( + $this->getServiceLocator()->get('VuFind\Mailer')->sendLink( $view->to, $view->from, $view->message, $url, $this->getViewRenderer(), 'bulk_email_title' ); diff --git a/module/VuFind/src/VuFind/Controller/SearchController.php b/module/VuFind/src/VuFind/Controller/SearchController.php index b5ee0229585..cac7dec2498 100644 --- a/module/VuFind/src/VuFind/Controller/SearchController.php +++ b/module/VuFind/src/VuFind/Controller/SearchController.php @@ -99,7 +99,7 @@ class SearchController extends AbstractSearch // Attempt to send the email and show an appropriate flash message: try { // If we got this far, we're ready to send the email: - $this->getServiceLocator()->get('Mailer')->sendLink( + $this->getServiceLocator()->get('VuFind\Mailer')->sendLink( $view->to, $view->from, $view->message, $view->url, $this->getViewRenderer() ); diff --git a/module/VuFind/src/VuFind/Log/Logger.php b/module/VuFind/src/VuFind/Log/Logger.php index ef5ddb73577..e71b1e55363 100644 --- a/module/VuFind/src/VuFind/Log/Logger.php +++ b/module/VuFind/src/VuFind/Log/Logger.php @@ -121,7 +121,7 @@ class Logger extends BaseLogger implements ServiceLocatorAwareInterface $error_types = isset($parts[1]) ? $parts[1] : ''; // use smtp - $mailer = $this->getServiceLocator()->get('Mailer'); + $mailer = $this->getServiceLocator()->get('VuFind\Mailer'); $msg = $mailer->getNewMessage() ->addFrom($config->Site->email) ->addTo($email) -- GitLab