![]() |
PHPDevShell 3.1.3-Stable
PHP OOP RAD Development Framework
|
Public Member Functions | |
| construct ($orm=null) | |
| errorShow () | |
| ok () | |
| error ($error_message='', $field='') | |
| errorElse ($error_message='', $field='FORM') | |
| importFields ($array) | |
| field ($key=null, $default=null) | |
| REQUEST ($key=null, $default=null) | |
| POST ($key=null, $default=null) | |
| GET ($key=null, $default=null) | |
| select ($options, $selected) | |
| checkbox ($name, $options, $checked) | |
| radio ($name, $options, $checked) | |
| selectElements ($name, $options, $checked, $type) | |
| multiSelected ($val, $join_id=null, $columns= 'join_id, value') | |
| isMultipleOption ($val, $default=null) | |
| multiSelectedModel ($val, $join_id=null, $columns= 'join_id, value', $default=null) | |
| multiSelectedORM ($val, $join_id=null, $columns= 'join_id, value', $default=null) | |
| addField ($val, $default=null) | |
| is ($val, $default=null) | |
| isField ($val, $default=null) | |
| isNumeric ($val, $default=null) | |
| isEmail ($val, $default=null) | |
| isUrl ($val, $default=null) | |
| isIpAddress ($val, $default=null) | |
| isAlpha ($val, $default=null) | |
| isAlphaNumeric ($val, $default=null) | |
| isAlphaNumericDash ($val, $default=null) | |
| isAlphaDash ($val, $default=null) | |
| isInteger ($val, $default=null) | |
| isCreditCard ($val, $default=null) | |
| isRangeLength ($val, $min=0, $max=0, $default=null) | |
| isMinLength ($val, $min, $default=null) | |
| isMaxLength ($val, $max, $default=null) | |
| isMaxValue ($val, $max, $default=null) | |
| isMinValue ($val, $min, $default=null) | |
| isRangeValue ($val, $min, $max, $default=null) | |
| isLength ($val, $length, $default=null) | |
| isDecimal ($val, $default=null) | |
| isHexColor ($val, $default=null) | |
| isRegex ($val, $expression, $default=null) | |
| isMatches ($val, $value, $default=null) | |
| isEmpty ($val, $default=null) | |
| isDate ($val, $default=null) | |
| isEnum ($val, $arr, $default=null) | |
| isMd5 ($val, $default=null) | |
| isBase64 ($val, $default=null) | |
| isUnique ($val, $default=null) | |
| isRgb ($val, $default=null) | |
| isBoolean ($val, $default=null) | |
| isToken ($val, $default=null) | |
| isEmailDomain ($val, $default=null) | |
| isPhone ($val, $lengths=null, $default=null) | |
| isUtf8 ($val, $default=null) | |
| isLower ($val, $default=null) | |
| isUpper ($val, $default=null) | |
| isPincode ($val, $country= 'us', $default=null) | |
| isUrlExists ($val, $default=null) | |
| isJsSafe ($val, $default=null) | |
| isHtmlSafe ($val, $default=null) | |
| isMultiLine ($val, $default=null) | |
| isExists ($val, $arr, $default=null) | |
| isAscii ($val, $default=null) | |
| isMacAddress ($val, $default=null) | |
| isUsssn ($val, $default=null) | |
| isDateDE ($val, $default=null) | |
| isDateISO ($val, $default=null) | |
| isTimezone ($val, $default=null) | |
| isTime24 ($val, $default=null) | |
| isTime12 ($val, $default=null) | |
Data Fields | |
| $get | |
| $post | |
| $request | |
| $protect = true | |
| $from = 'post' | |
| $orm = null | |
| $f | |
| $lastField | |
| $selectWrite | |
| $errorExist = array() | |
RedBeanPHP ORM plugin.
| addField | ( | $ | val, |
| $ | default = null |
||
| ) |
a Clean way to add more variable to crud stack.
| string | expecting form field name |
| mixed | a Default value to set the field to if failing. |
| mixed | The default value that should be used when empty. |
| checkbox | ( | $ | name, |
| $ | options, | ||
| $ | checked | ||
| ) |
Makes check boxes easy to create and maintain.
| type | $name | |
| type | $options | |
| type | $checked |
| construct | ( | $ | orm = null | ) |
This method does the actual security check, other security checks are done on a per call basis to this method in specific scripts. Improved version reduces the cost of queries by 3, I also believe that this is a more secure method.
| boolean | $validate_crypt_key | Set if you would like the system to verify an encryption before accepting global $_POST variables. Use with method send_crypt_key_validation in your form. |
| error | ( | $ | error_message = '', |
| $ | field = '' |
||
| ) |
Ater each validation, add this as the condition to report the error and its message.
| string | $error_message | |
| string | $field | This should be the field name, else it will auto detect. |
| errorElse | ( | $ | error_message = '', |
| $ | field = 'FORM' |
||
| ) |
For a general form error, this can be used to halt the ok process.
| string | $error_message | |
| string | $id | This should be the element id name, else it will use the form tag. |
| errorShow | ( | ) |
After each form validation methods, use this to compile error fields if any.
| field | ( | $ | key = null, |
| $ | default = null |
||
| ) |
Allows system to do general check on specified form receive type.
| mixed | $key | |
| mixed | $default |
| GET | ( | $ | key = null, |
| $ | default = null |
||
| ) |
Return a value from the GET meta array
| string | null | $key | the name of the get variable to fetch; if null, the entire array is returned |
| mixed | array | $default | a default value to return when the get variable is not set; when returning the entire array, an array can be given here with default values |
| importFields | ( | $ | array | ) |
Allows import of arrays and converts them to properties for easy access.
| type | $array |
| is | ( | $ | val, |
| $ | default = null |
||
| ) |
check if field empty string ,orject,array
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isAlpha | ( | $ | val, |
| $ | default = null |
||
| ) |
Matches only alpha letters
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isAlphaDash | ( | $ | val, |
| $ | default = null |
||
| ) |
Matches alpha and dashes like -,_
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isAlphaNumeric | ( | $ | val, |
| $ | default = null |
||
| ) |
Matches alpha and numbers only
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isAlphaNumericDash | ( | $ | val, |
| $ | default = null |
||
| ) |
Matches alpha ,numbers,-,_ values
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isAscii | ( | $ | val, |
| $ | default = null |
||
| ) |
is given string is ascii format?
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isBase64 | ( | $ | val, |
| $ | default = null |
||
| ) |
Matches base64 enoding string
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isBoolean | ( | $ | val, |
| $ | default = null |
||
| ) |
is given field is boolean value or not
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isCreditCard | ( | $ | val, |
| $ | default = null |
||
| ) |
Valid Credit Card
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isDate | ( | $ | val, |
| $ | default = null |
||
| ) |
Check if given string matches any format date
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isDateDE | ( | $ | val, |
| $ | default = null |
||
| ) |
Checks given value matches date de
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isDateISO | ( | $ | val, |
| $ | default = null |
||
| ) |
Checks given value matches us citizen social security number
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isDecimal | ( | $ | val, |
| $ | default = null |
||
| ) |
check decimal with . is optional and after decimal places up to 6th precision
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isEmail | ( | $ | val, |
| $ | default = null |
||
| ) |
valid email
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isEmailDomain | ( | $ | val, |
| $ | default = null |
||
| ) |
Checks that a field is exactly the right length.
| string | expecting form field name |
| mixed | The default value that should be used when empty. not added to Windows until PHP 5.3.0 boolean |
| isEmpty | ( | $ | val, |
| $ | default = null |
||
| ) |
check if field empty string ,orject,array
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isEnum | ( | $ | val, |
| $ | arr, | ||
| $ | default = null |
||
| ) |
check given string againest given array values
| string | expecting form field name |
| array | |
| mixed | The default value that should be used when empty. |
| isExists | ( | $ | val, |
| $ | arr, | ||
| $ | default = null |
||
| ) |
check given array key element exists?
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isField | ( | $ | val, |
| $ | default = null |
||
| ) |
Returns fields value
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isHexColor | ( | $ | val, |
| $ | default = null |
||
| ) |
Valid hexadecimal color ,that may have #,
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isHtmlSafe | ( | $ | val, |
| $ | default = null |
||
| ) |
given sting has html tags?
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isInteger | ( | $ | val, |
| $ | default = null |
||
| ) |
Matches exactly number
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isIpAddress | ( | $ | val, |
| $ | default = null |
||
| ) |
Valid IP address
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isJsSafe | ( | $ | val, |
| $ | default = null |
||
| ) |
Check given sting has script tags
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isLength | ( | $ | val, |
| $ | length, | ||
| $ | default = null |
||
| ) |
check for exactly length of string
| string | expecting form field name |
| int | expecting lenght of string |
| mixed | The default value that should be used when empty. |
| isLower | ( | $ | val, |
| $ | default = null |
||
| ) |
Given sting is lower cased
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isMacAddress | ( | $ | val, |
| $ | default = null |
||
| ) |
Checks given value again MAC address of the computer
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isMatches | ( | $ | val, |
| $ | value, | ||
| $ | default = null |
||
| ) |
compares two any kind of values ,stictly
| string | expecting form field name |
| mixed | expecting string to compare too |
| mixed | The default value that should be used when empty. |
| isMaxLength | ( | $ | val, |
| $ | max, | ||
| $ | default = null |
||
| ) |
check string length exceeds maximum length
| string | expecting form field name |
| int | max |
| mixed | The default value that should be used when empty. |
| isMaxValue | ( | $ | val, |
| $ | max, | ||
| $ | default = null |
||
| ) |
check given number exceeds max values
| string | expecting form field name |
| int | max |
| mixed | The default value that should be used when empty. |
| isMd5 | ( | $ | val, |
| $ | default = null |
||
| ) |
Checks that a field matches a v2 md5 string
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isMinLength | ( | $ | val, |
| $ | min, | ||
| $ | default = null |
||
| ) |
Check the string length has minimum length
| string | expecting form field name |
| int | min |
| mixed | The default value that should be used when empty. |
| isMinValue | ( | $ | val, |
| $ | min, | ||
| $ | default = null |
||
| ) |
check given number below value
| string | expecting form field name |
| int | min |
| mixed | The default value that should be used when empty. |
| isMultiLine | ( | $ | val, |
| $ | default = null |
||
| ) |
check given sring has multilines
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isMultipleOption | ( | $ | val, |
| $ | default = null |
||
| ) |
Simple check for multiple options.
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isNumeric | ( | $ | val, |
| $ | default = null |
||
| ) |
check a number optional -,+,. values
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isPhone | ( | $ | val, |
| $ | lengths = null, |
||
| $ | default = null |
||
| ) |
Matches a phone number that length optional numbers 7,10,11
| string | expecting form field name |
| int | expecting number lenght |
| mixed | The default value that should be used when empty. |
| isPincode | ( | $ | val, |
| $ | country = 'us', |
||
| $ | default = null |
||
| ) |
Checks that given value matches following country pin codes. at = austria au = australia ca = canada de = german ee = estonia nl = netherlands it = italy pt = portugal se = sweden uk = united kingdom us = united states
| String | expecting form field name |
| String | expecting country code |
| mixed | The default value that should be used when empty. |
| isRangeLength | ( | $ | val, |
| $ | min = 0, |
||
| $ | max = 0, |
||
| $ | default = null |
||
| ) |
check given string length is between given range
| string | expecting form field name |
| int | min |
| int | max |
| mixed | The default value that should be used when empty. |
| isRangeValue | ( | $ | val, |
| $ | min, | ||
| $ | max, | ||
| $ | default = null |
||
| ) |
check given number between given values
| string | expecting form field name |
| int | min |
| int | max |
| mixed | The default value that should be used when empty. |
| isRegex | ( | $ | val, |
| $ | expression, | ||
| $ | default = null |
||
| ) |
Matches againest given regular expression ,including delimeters
| string | expecting form field name |
| string | regular expression string to compare against |
| mixed | The default value that should be used when empty. |
| isRgb | ( | $ | val, |
| $ | default = null |
||
| ) |
Check is rgb color value
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isTime12 | ( | $ | val, |
| $ | default = null |
||
| ) |
Time in 12 hours format with optional seconds 08:00AM | 10:00am | 7:00pm
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isTime24 | ( | $ | val, |
| $ | default = null |
||
| ) |
Time in 24 hours format with optional seconds 12:15 | 10:26:59 | 22:01:15
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isTimezone | ( | $ | val, |
| $ | default = null |
||
| ) |
Checks given value matches a time zone +00:00 | -05:00
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isToken | ( | $ | val, |
| $ | default = null |
||
| ) |
A token that don't have any white space
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isUnique | ( | $ | val, |
| $ | default = null |
||
| ) |
check if array has unique elements,it must have minimum one element
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isUpper | ( | $ | val, |
| $ | default = null |
||
| ) |
Given string is upper cased?
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isUrl | ( | $ | val, |
| $ | default = null |
||
| ) |
Valid URL or web address
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isUrlExists | ( | $ | val, |
| $ | default = null |
||
| ) |
Check given url really exists?
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isUsssn | ( | $ | val, |
| $ | default = null |
||
| ) |
Checks given value matches us citizen social security number
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| isUtf8 | ( | $ | val, |
| $ | default = null |
||
| ) |
check given sting is UTF8
| string | expecting form field name |
| mixed | The default value that should be used when empty. |
| multiSelected | ( | $ | val, |
| $ | join_id = null, |
||
| $ | columns = 'join_id, |
||
| value' | |||
| ) |
Allows you to easily maintain selected fields.
| string | $val | |
| int | $join_id | |
| string | $columns |
| multiSelectedModel | ( | $ | val, |
| $ | join_id = null, |
||
| $ | columns = 'join_id, |
||
| value' | , | ||
| $ | default = null |
||
| ) |
Allows you to easily maintain selected fields.
| string | $val | |
| int | $join_id | |
| string | $columns | |
| mixed | The default value that should be used when empty. |
| multiSelectedORM | ( | $ | val, |
| $ | join_id = null, |
||
| $ | columns = 'join_id, |
||
| value' | , | ||
| $ | default = null |
||
| ) |
Allows you to easily maintain selected fields.
| string | $val | |
| int | $join_id | |
| string | $columns | |
| mixed | The default value that should be used when empty. |
| ok | ( | ) |
Check if the data was submitted ok and make sure there are no errors.
| POST | ( | $ | key = null, |
| $ | default = null |
||
| ) |
Return a value from the POST array
| string | null | $key | the name of the post variable to fetch; if null, the entire array is returned |
| mixed | array | $default | a default value to return when the post variable is not set; when returning the entire array, an array can be given here with default values |
| radio | ( | $ | name, |
| $ | options, | ||
| $ | checked | ||
| ) |
Makes radio buttons easy to create and maintain.
| type | $name | |
| type | $options | |
| type | $checked |
| REQUEST | ( | $ | key = null, |
| $ | default = null |
||
| ) |
Return a value from the REQUEST array
| string | null | $key | the name of the post variable to fetch; if null, the entire array is returned |
| mixed | array | $default | a default value to return when the post variable is not set; when returning the entire array, an array can be given here with default values |
| select | ( | $ | options, |
| $ | selected | ||
| ) |
Makes select fields easy to create and maintain.
| type | $options | |
| type | $selected |
| selectElements | ( | $ | name, |
| $ | options, | ||
| $ | checked, | ||
| $ | type | ||
| ) |
Maintainer for radio checkboxes and select fields.
| type | $name | |
| type | $options | |
| type | $checked | |
| type | $type |
| $errorExist = array() |
| $f |
| $from = 'post' |
| $get |
| $lastField |
| $orm = null |
| $post |
| $protect = true |
| $request |
| $selectWrite |