1 <?php
  2 /**
  3  * @package     Joomla.Platform
  4  * @subpackage  Mail
  5  *
  6  * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
  7  * @license     GNU General Public License version 2 or later; see LICENSE
  8  */
  9 
 10 defined('JPATH_PLATFORM') or die;
 11 
 12 /**
 13  * Wrapper class for JMailHelper
 14  *
 15  * @package     Joomla.Platform
 16  * @subpackage  Mail
 17  * @since       3.4
 18  */
 19 class JMailWrapperHelper
 20 {
 21     /**
 22      * Helper wrapper method for cleanLine
 23      *
 24      * @param   string  $value  String to be cleaned.
 25      *
 26      * @return  string  Cleaned string.
 27      *
 28      * @see     JMailHelper::cleanLine()
 29      * @since   3.4
 30      */
 31     public function cleanLine($value)
 32     {
 33         return JMailHelper::cleanLine($value);
 34     }
 35 
 36     /**
 37      * Helper wrapper method for cleanText
 38      *
 39      * @param   string  $value  Multi-line string to be cleaned.
 40      *
 41      * @return  string  Cleaned multi-line string.
 42      *
 43      * @see     JMailHelper::cleanText()
 44      * @since   3.4
 45      */
 46     public function cleanText($value)
 47     {
 48         return JMailHelper::cleanText($value);
 49     }
 50 
 51     /**
 52      * Helper wrapper method for cleanBody
 53      *
 54      * @param   string  $body  email body string.
 55      *
 56      * @return  string  Cleaned email body string.
 57      *
 58      * @see     JMailHelper::cleanBody()
 59      * @since   3.4
 60      */
 61     public function cleanBody($body)
 62     {
 63         return JMailHelper::cleanBody($body);
 64     }
 65 
 66     /**
 67      * Helper wrapper method for cleanSubject
 68      *
 69      * @param   string  $subject  email subject string.
 70      *
 71      * @return  string  Cleaned email subject string.
 72      *
 73      * @see     JMailHelper::cleanSubject()
 74      * @since   3.4
 75      */
 76     public function cleanSubject($subject)
 77     {
 78         return JMailHelper::cleanSubject($subject);
 79     }
 80 
 81     /**
 82      * Helper wrapper method for cleanAddress
 83      *
 84      * @param   string  $address  email address.
 85      *
 86      * @return  mixed   email address string or boolean false if injected headers are present
 87      *
 88      * @see     JMailHelper::cleanAddress()
 89      * @since   3.4
 90      */
 91     public function cleanAddress($address)
 92     {
 93         return JMailHelper::cleanAddress($address);
 94     }
 95 
 96     /**
 97      * Helper wrapper method for isEmailAddress
 98      *
 99      * @param   string  $email  String to be verified.
100      *
101      * @return boolean  True if string has the correct format; false otherwise.
102      *
103      * @see     JMailHelper::isEmailAddress()
104      * @since   3.4
105      */
106     public function isEmailAddress($email)
107     {
108         return JMailHelper::isEmailAddress($email);
109     }
110 }
111