메소드 |
설명 |
|
__call ( $name, $args ) : boolean | mixed |
|
|
__construct ( ) : Cage |
|
|
addAccessor ( string $accessor_name ) : void |
This method lets the developer add new accessor methods to a cage object
Note that calling these will be quite a bit slower, because we have to
use call_user_func() |
|
count ( ) : integer |
Returns the number of elements in $this->source. |
|
escMySQL ( string $key, resource $conn ) : boolean | mixed |
|
|
escPgSQL ( $key, null $conn = null ) : boolean | mixed |
|
|
escPgSQLBytea ( $key, null $conn = null ) : boolean | mixed |
|
|
factory ( array &$source, string $conf_file = null, string $conf_section = null, boolean $strict = true ) : Cage |
Takes an array and wraps it inside an object. If $strict is not set to
FALSE, the original array will be destroyed, and the data can only be
accessed via the object's accessor methods |
|
getAlnum ( mixed $key ) : mixed |
Returns only the alphabetic characters and digits in value. |
|
getAlpha ( mixed $key ) : mixed |
Returns only the alphabetic characters in value. |
|
getDigits ( mixed $key ) : mixed |
Returns only the digits in value. This differs from getInt(). |
|
getDir ( mixed $key ) : mixed |
Returns dirname(value). |
|
getHTMLPurifier ( ) : HTMLPurifier |
|
|
getInt ( mixed $key ) : integer |
Returns (int) value. |
|
getIterator ( ) : ArrayIterator |
Returns an iterator for looping through an ArrayObject. |
|
getPath ( mixed $key ) : mixed |
Returns realpath(value). |
|
getPurifiedHTML ( string $key ) : mixed |
This returns the value of the given key passed through the HTMLPurifer
object, if it is instantiated with Cage::loadHTMLPurifer |
|
getROT13 ( string $key ) : mixed |
Returns ROT13-encoded version |
|
getRaw ( string $key ) : mixed |
Returns value. |
|
getValue ( string $key ) : mixed |
Retrieves a value from the source array. This should NOT be called directly, but needs to be public
for use by AccessorAbstract. Maybe a different approach should be considered |
|
keyExists ( mixed $key ) : boolean |
Checks if a key exists |
|
loadHTMLPurifier ( mixed $opts = null ) |
Load the HTMLPurifier library and instantiate the object |
|
noPath ( mixed $key ) : mixed |
Returns basename(value). |
|
noTags ( mixed $key ) : mixed |
Returns value with all tags removed. |
|
noTagsOrSpecial ( $key ) : array | boolean | mixed | string |
|
|
offsetExists ( mixed $offset ) : boolean |
Returns whether the $offset exists in $this->source. |
|
offsetGet ( mixed $offset ) : mixed |
Returns the value at $offset from $this->source. |
|
offsetSet ( mixed $offset, mixed $value ) : void |
Sets the value at the specified $offset to value$
in $this->source. |
|
offsetUnset ( mixed $offset ) : void |
Unsets the value in $this->source at $offset. |
|
setHTMLPurifier ( HTMLPurifier $pobj ) |
|
|
testAlnum ( mixed $key ) : mixed |
Returns value if every character is alphabetic or a digit,
FALSE otherwise. |
|
testAlpha ( mixed $key ) : mixed |
Returns value if every character is alphabetic, FALSE
otherwise. |
|
testBetween ( mixed $key, mixed $min, mixed $max, boolean $inc = true ) : mixed |
Returns value if it is greater than or equal to $min and less
than or equal to $max, FALSE otherwise. If $inc is set to
FALSE, then the value must be strictly greater than $min and
strictly less than $max. |
|
testCcnum ( mixed $key, mixed $type = null ) : mixed |
Returns value if it is a valid credit card number format. The
optional second argument allows developers to indicate the
type. |
|
testDate ( mixed $key ) : mixed |
Returns $value if it is a valid date, FALSE otherwise. The
date is required to be in ISO 8601 format. |
|
testDigits ( mixed $key ) : mixed |
Returns value if every character is a digit, FALSE otherwise. |
|
testEmail ( mixed $key ) : mixed |
Returns value if it is a valid email format, FALSE otherwise. |
|
testFloat ( mixed $key ) : mixed |
Returns value if it is a valid float value, FALSE otherwise. |
|
testGreaterThan ( mixed $key, mixed $min = null ) : mixed |
Returns value if it is greater than $min, FALSE otherwise. |
|
testHex ( mixed $key ) : mixed |
Returns value if it is a valid hexadecimal format, FALSE
otherwise. |
|
testHostname ( mixed $key, integer $allow = Inspekt::ISPK_HOST_ALLOW_ALL ) : mixed |
Returns value if it is a valid hostname, FALSE otherwise. |
|
testInt ( mixed $key ) : mixed |
Returns value if it is a valid integer value, FALSE otherwise. |
|
testIp ( mixed $key ) : mixed |
Returns value if it is a valid IP format, FALSE otherwise. |
|
testLessThan ( mixed $key, mixed $max = null ) : mixed |
Returns value if it is less than $max, FALSE otherwise. |
|
testOneOf ( mixed $key, null $allowed = null ) : mixed |
Returns value if it is one of $allowed, FALSE otherwise. |
|
testPhone ( mixed $key, string $country = 'US' ) : mixed |
Returns value if it is a valid phone number format, FALSE
otherwise. The optional second argument indicates the country. |
|
testRegex ( mixed $key, mixed $pattern ) : mixed |
Returns value if it matches $pattern, FALSE otherwise. Uses
preg_match() for the matching. |
|
testUri ( string $key ) : boolean | string |
Enter description here. |
|
testZip ( mixed $key ) : mixed |
Returns value if it is a valid US ZIP, FALSE otherwise. |
|