Class: Validator

Source Location: Program_Root/eDFramework/eDValidator.php

Class Overview [line 7]


Validator Class

Author(s):

Version:

Copyright:

Variables

Methods


Inherited Variables

Inherited Methods



Class Details

Validator Class

[ Top ]


Class Variables

$CLEAR =    false

[line 9]

Type: mixed

Overrides:

[ Top ]

$ERROR =    ""

[line 8]

Type: mixed

Overrides:

[ Top ]


Class Methods

Validator

Validator Validator( )

[line 12]

Constructor

Parameters:

[ Top ]

array_echo

void array_echo( mixed $MyArray, [mixed $Name = "Array"])

[line 275]

Array_Echo will walk through an array, continuously printing out key value pairs.

Multi dimensional arrays are handled recursively.

Parameters:

[ Top ]

chconvert

void chconvert( mixed $fragment)

[line 30]

Parameters:

[ Top ]

clear_error

void clear_error( )

[line 17]

Parameters:

[ Top ]

custom_strip

void custom_strip( mixed $Chars, [mixed $text = ""])

[line 251]

$Chars must be an array of characters to remove.

This method is meta-character safe.

Parameters:

[ Top ]

get_perms

void get_perms( mixed $fileName)

[line 52]

Parameters:

[ Top ]

has_html

void has_html( [mixed $text = ""])

[line 165]

Checks for HTML entities in submitted text

If found returns true, otherwise false. HTML specials are: " => &quot; < => &lt; > => &gt; & => &amp; The presence of ",<,>,& will force this method to return true.

Parameters:

[ Top ]

has_metas

void has_metas( [mixed $text = ""])

[line 220]

Returns true of the submitted text has meta characters in it

. \\ + * ? [ ^ ] ( $ )

Parameters:

[ Top ]

has_space

void has_space( mixed $text)

[line 22]

Checks a string for whitespace. True or false

Parameters:

[ Top ]

is_allletters

void is_allletters( mixed $text)

[line 139]

Parameters:

[ Top ]

is_allnumbers

void is_allnumbers( mixed $text)

[line 120]

Parameters:

[ Top ]

is_email

void is_email( [mixed $Address = ""])

[line 317]

Valid email format? true or false This checks the raw address, not RFC 822 addresses.

Looks for [something]@[valid hostname with DNS record]

Parameters:

[ Top ]

is_host

void is_host( [mixed $hostname = ''], [mixed $type = 'ANY'])

[line 346]

Hostname is a reachable internet host? true or false

Parameters:

[ Top ]

is_hostname

void is_hostname( [mixed $hostname = ""])

[line 363]

Valid, fully qualified hostname? true or false

Checks the -syntax- of the hostname, not it's actual validity as a reachable internet host

Parameters:

[ Top ]

is_sane

void is_sane( mixed $filename)

[line 84]

Parameters:

[ Top ]

strip_html

void strip_html( [mixed $text = ""])

[line 190]

strip_html() Strips all html entities, attributes, elements and tags from the submitted string data and returns the results.

Can't use a regex here because there's no way to know how the data is laid out. We have to examine every character that's been submitted. Consequently, this is not a very efficient method. It works, it's very good at removing all html from the data, but don't send gobs of data at it or your program will slow to a crawl. If you're stripping HTML from a file, use PHP's fgetss() and NOT this method, as fgetss() does the same thing about 100x faster

Parameters:

[ Top ]

strip_letters

void strip_letters( mixed $text)

[line 151]

Parameters:

[ Top ]

strip_metas

void strip_metas( [mixed $text = ""])

[line 237]

Strips " . \\ + * ? [ ^ ] ( $ ) " from submitted string

Metas are a virtual MINE FIELD for regular expressions, see custom_strip() for how they are removed

Parameters:

[ Top ]

strip_numbers

void strip_numbers( mixed $text)

[line 133]

Parameters:

[ Top ]

strip_space

void strip_space( mixed $text)

[line 114]

Parameters:

[ Top ]


Documentation generated on Wed, 10 Dec 2003 21:47:54 +0100 by phpDocumentor 1.2.2