VCL
[ class tree: VCL ] [ index: VCL ] [ all elements ]

Class: InputParam

Source Location: /system.inc.php

Class Overview


Represents an input parameter from the user, it doesn't inherit from Object to be faster and smaller.


Variables

Methods


Child classes:

RawInputParam
This class represents an input param with no filtering at all.

Class Details

[line 385]
Represents an input parameter from the user, it doesn't inherit from Object to be faster and smaller.

Objects of this type are returned from the Input object and you must use any of the available methods like asString() to get the value filtered properly.




[ Top ]


Class Variables

$filter = null

[line 390]



Tags:

access:  public

Type:   mixed


[ Top ]

$filter_extension = false

[line 389]



Tags:

access:  public

Type:   mixed


[ Top ]

$name = ''

[line 387]



Tags:

access:  public

Type:   mixed


[ Top ]

$stream =

[line 388]



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 397]

InputParam __construct( $name $name, [$stream $stream = SGET])

Create the object



Parameters:

$name   $name   Key of the stream to look form
$stream   $stream   Stream to look for

[ Top ]

method asBoolean [line 514]

boolean asBoolean( )

Returns the input filtered as a boolean

Use this property to get the value from the input as a boolean value. The input is validated and if it's not a boolean, an empty string is returned.




Overridden in child classes as:

RawInputParam::asBoolean()

[ Top ]

method asEmail [line 609]

string asEmail( )

Returns the input filtered as an email address

Use this property to get the value from the input as an email. The input is sanitized to remove anything that might not be part of an email.




Overridden in child classes as:

RawInputParam::asEmail()

[ Top ]

method asEncoded [line 679]

string asEncoded( )

URL-encode string, optionally strip or encode special characters.

Use this property to get the value from the input as an encoded URL. The input is sanitized to remove anything that might not be part of an encoded url.




Overridden in child classes as:

RawInputParam::asEncoded()

[ Top ]

method asFloat [line 539]

float asFloat( [integer $flags = 0])

Returns the input filtered as a float

Use this property to get the value from the input as a float value. The input is sanitized to remove anything that might not be part of a float number.




Overridden in child classes as:

RawInputParam::asFloat()

Parameters:

integer   $flags   Flags to be sent when getting the value asfloat

[ Top ]

method asInteger [line 491]

integer asInteger( )

Returns the input filtered as a integer



Overridden in child classes as:

RawInputParam::asInteger()

[ Top ]

method asIP [line 632]

string asIP( )

Returns the input filtered as an IP address

Use this property to get the value from the input as an IP number. The input is validated to see if it's a valid IP and if not, an empty string is returned.




Overridden in child classes as:

RawInputParam::asIP()

[ Top ]

method asRegExp [line 562]

string asRegExp( )

Returns the input filtered as a regular expression

Use this property to get the value from the input as a float value. The input is validated and if it's not a regular expression, an empty string is returned.




Overridden in child classes as:

RawInputParam::asRegExp()

[ Top ]

method asSpecialChars [line 699]

string asSpecialChars( )

HTML-escape '"<>& and characters with ASCII value less than 32, optionally strip or encode other special characters.



Overridden in child classes as:

RawInputParam::asSpecialChars()

[ Top ]

method asString [line 442]

string asString( )

Returns the input filtered as a string

Use this property to get the value from the input as a string value. The input is sanitized to strip out dangerous content.




Overridden in child classes as:

RawInputParam::asString()

[ Top ]

method asStringArray [line 465]

array asStringArray( )

Returns the input filtered as a string array

Use this property to get the value from the input as a string array. The input is sanitized to strip out dangerous content.




Overridden in child classes as:

RawInputParam::asStringArray()

[ Top ]

method asStripped [line 656]

string asStripped( )

Returns the input filtered as an string

Use this property to get the value from the input as string. The input is sanitized to remove anything that may cause a security issue.




Overridden in child classes as:

RawInputParam::asStripped()

[ Top ]

method asUnsafeRaw [line 721]

string asUnsafeRaw( )

Do nothing with the input

Use it to get the input as-is, use it when you know, for sure, the input is safe.




Overridden in child classes as:

RawInputParam::asUnsafeRaw()

[ Top ]

method asURL [line 586]

string asURL( )

Returns the input filtered as an URL

Use this property to get the value from the input as an URL. The input is sanitized to remove anything that might not be part of a URL.




Overridden in child classes as:

RawInputParam::asURL()

[ Top ]

method createNativeFilter [line 427]

void createNativeFilter( )

Creates the native Input Filter to be used when there is no available extension



[ Top ]


Documentation generated on Sat, 13 Jun 2009 10:52:12 -0700 by phpDocumentor 1.4.1