/** * @param string $verbName * @param CM_Model_User|int $actor * @param int $typeEmail */ public function __construct($verbName, $actor, $typeEmail) { parent::__construct($verbName, $actor); $typeEmail = (int) $typeEmail; try { $className = CM_Mail_Mailable::_getClassName($typeEmail); $this->_nameEmail = ucwords(CM_Util::uncamelize(str_replace('_', '', preg_replace('#\\A[^_]++_[^_]++_#', '', $className)), ' ')); } catch (CM_Class_Exception_TypeNotConfiguredException $exception) { CM_Service_Manager::getInstance()->getLogger()->warning('Unrecognized mail type when creating mail action', (new CM_Log_Context())->setException($exception)); $this->_nameEmail = (string) $typeEmail; } }
/** * @param string $verbName * @param CM_Model_User|int $actor * @param int $typeEmail */ public function __construct($verbName, $actor, $typeEmail) { parent::__construct($verbName, $actor); $typeEmail = (int) $typeEmail; try { $className = CM_Mail::_getClassName($typeEmail); $this->_nameEmail = ucwords(CM_Util::uncamelize(str_replace('_', '', preg_replace('#\\A[^_]++_[^_]++_#', '', $className)), ' ')); } catch (CM_Class_Exception_TypeNotConfiguredException $exception) { $exception->setSeverity(CM_Exception::WARN); CM_Bootloader::getInstance()->getExceptionHandler()->handleException($exception); $this->_nameEmail = (string) $typeEmail; } }