Class: Mail_RFC822
Source Location: /Mail-1.4.0/Mail/RFC822.php
RFC 822 Email address list validation Utility
Author(s):
Version:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
__construct (Constructor) [line 153]
object Mail_RFC822 __construct(
[string
$address = null], [string
$default_domain = null], [boolean
$nest_groups = null], [boolean
$validate = null], [
$limit = null])
|
|
Sets up the object. The address must either be set here or when calling parseAddressList(). One or the other.
Parameters:
approximateCount [line 901]
int approximateCount(
string
$data)
|
|
Returns an approximate count of how many addresses are in the given string. This is APPROXIMATE as it only splits based on a comma which has no preceding backslash. Could be useful as large amounts of addresses will end up producing *large* structures when used with parseAddressList().
Parameters:
isValidInetAddress [line 919]
mixed isValidInetAddress(
string
$data, [boolean
$strict = false])
|
|
This is a email validating function separate to the rest of the class. It simply validates whether an email is of the common internet form: <user>@<domain>. This can be sufficient for most people. Optional stricter mode can be utilised which restricts mailbox characters allowed to alphanumeric, full stop, hyphen and underscore.
Parameters:
parseAddressList [line 173]
array parseAddressList(
[string
$address = null], [string
$default_domain = null], [boolean
$nest_groups = null], [boolean
$validate = null], [
$limit = null])
|
|
Starts the whole process. The address must either be set here or when creating the object. One or the other.
Parameters:
validateMailbox [line 611]
boolean validateMailbox(
string
&$mailbox)
|
|
Function to validate a mailbox, which is: mailbox = addr-spec ; simple address / phrase route-addr ; name and route-addr
Parameters:
_hasUnclosedBrackets [line 395]
boolean _hasUnclosedBrackets(
string
$string, string
$chars)
|
|
Checks if a string has an unclosed brackets or not. IMPORTANT: This function handles both angle brackets and square brackets;
Parameters:
_hasUnclosedBracketsSub [line 419]
integer _hasUnclosedBracketsSub(
string
$string, integer
&$num, string
$char)
|
|
Sub function that is used only by hasUnclosedBrackets().
Parameters:
_hasUnclosedQuotes [line 359]
boolean _hasUnclosedQuotes(
string
$string)
|
|
Checks if a string has unclosed quotes or not.
Parameters:
_isGroup [line 303]
boolean _isGroup(
string
$address)
|
|
Checks for a group at the start of the string.
Parameters:
_splitAddresses [line 228]
boolean _splitAddresses(
string
$address)
|
|
Splits an address into separate addresses.
Parameters:
_splitCheck [line 327]
mixed _splitCheck(
array
$parts, string
$char)
|
|
A common function that will check an exploded string.
Parameters:
_validateAddress [line 438]
mixed _validateAddress(
string
$address)
|
|
Function to begin checking the address.
Parameters:
_validateAddrSpec [line 829]
mixed _validateAddrSpec(
string
$addr_spec)
|
|
Function to validate an addr-spec. addr-spec = local-part "@" domain
Parameters:
_validateAtom [line 562]
boolean _validateAtom(
string
$atom)
|
|
Function to validate an atom which from rfc822 is: atom = 1*<any CHAR except specials, SPACE and CTLs> If validation ($this->validate) has been turned off, then validateAtom() doesn't actually check anything. This is so that you can split a list of addresses up before encoding personal names (umlauts, etc.), for example.
Parameters:
_validateDliteral [line 816]
boolean _validateDliteral(
string
$dliteral)
|
|
Function to validate a domain literal: domain-literal = "[" *(dtext / quoted-pair) "]"
Parameters:
_validateDomain [line 770]
mixed _validateDomain(
string
$domain)
|
|
Function to validate a domain, though this is not quite what you expect of a strict internet domain. domain = sub-domain *("." sub-domain)
Parameters:
_validateLocalPart [line 859]
mixed _validateLocalPart(
string
$local_part)
|
|
Function to validate the local part of an address: local-part = word *("." word)
Parameters:
_validatePhrase [line 522]
boolean _validatePhrase(
string
$phrase)
|
|
Function to validate a phrase.
Parameters:
_validateQuotedString [line 594]
boolean _validateQuotedString(
string
$qstring)
|
|
Function to validate quoted string, which is: quoted-string = <"> *(qtext/quoted-pair) <">
Parameters:
_validateRoute [line 748]
mixed _validateRoute(
string
$route)
|
|
Function to validate a route, which is: route = 1#("@" domain) ":"
Parameters:
_validateRouteAddr [line 699]
mixed _validateRouteAddr(
string
$route_addr)
|
|
This function validates a route-addr which is: route-addr = "<" [route] addr-spec ">" Angle brackets have already been removed at the point of getting to this function.
Parameters:
_validateSubdomain [line 797]
boolean _validateSubdomain(
string
$subdomain)
|
|
Function to validate a subdomain: subdomain = domain-ref / domain-literal
Parameters:
Documentation generated on Mon, 11 Mar 2019 14:27:25 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|