Public Method Details |
Bs_EmailUtil |
|
public void Bs_EmailUtil( )
|
| |
Constructor
|
| Returns |
void |
|
parse |
|
public array parse( string $email )
|
| |
Validates the syntax of a given email address and parses it into it's elements.
|
| Parameter |
|
|
| Returns |
array a zerobased array. 0=user 1=host |
| Throws |
bool FALSE |
|
hideEmailWithJsDocumentWrite |
|
public string hideEmailWithJsDocumentWrite( string $email, [ string $name, string $cssClass ] )
|
| |
uses javascripts document.write() function to spit out the address as link.
non-js browsers will see a readable version of the address using the noscripttag.this is browser-safe and emailspider safe.most, like 98% of the web users won't notice a difference, and most, like99.9% of the email spiders won't catch the address. use it!
|
| Parameter |
|
|
|
| string |
$name |
= >>NULL,<< |
|
(default is NULL, which means use the $email address as 'caption' aswell.) |
|
|
| string |
$cssClass |
= >>NULL<< |
|
(if you want to apply a style sheet to the tag.) |
|
| Returns |
string (html code) |
| Throws |
bool FALSE (if the given email address is invalid.) |
| See Also |
emailHidingWithJsOnMouseOver() |
|
emailHidingWithJsOnMouseOver |
|
public string emailHidingWithJsOnMouseOver( string $email )
|
| |
|
| Parameter |
|
|
| Returns |
string (html code) |
| Throws |
bool FALSE (if the given email address is invalid.) |
| See Also |
hideEmailWithJsDocumentWrite() |
|
toPronounceable |
|
public void toPronounceable( string $email, [ mixed $lang ] )
|
| |
converts the given email address into a "pronounceable" string.
these languages are supported: (texts are written in lower case here)CHARACTERLANGUAGE @ . _ -'en' at dot underscore dash'de' at punkt unterstrich strich'de2' affenschwanz punkt unterstrich minusyou can pass an array (vector with 4 elements) as param 2 ($lang) to useyour own text. make sure you use a space in front and at the end of thestrings, or feel free to use something else.EXAMPLES: (the results are not html-encoded here for better reading)htmlEncode('tom.jones@hotmail.com') => tom DOT jones AT hotmail DOT comhtmlEncode('tom.jones@hotmail.com', 'de2') => tom PUNKT jones AFFENSCHWANZ hotmail PUNKT com
|
| Parameter |
|
|
|
| mixed |
$lang |
= >>'en'<< |
|
(default is 'en', see above) |
|
| Returns |
void |
|
htmlEncode |
|
public string htmlEncode( string $email )
|
| |
html-encodes the address.
this is just a wrapper for Bs_HtmlUtil->charToHtml().
|
| Parameter |
|
|
| Returns |
string |
|