Some basic utility classes and functions to be used throughout the CoMDEF system. More...
Classes | |
| class | bdfProfiler |
| Execution time/memory profiling class. More... | |
Functions | |
| SplitIntoMetaphone ($in_string, $in_lang_enum=null, $in_literal=false) | |
| Converts a string into an array of metaphone entities. | |
| FullCrypt ($in_string, $in_salt=null, &$crypt_method=null) | |
| Encrypts a string, using the most effective encryption. | |
| json_prepare ($data, $escapeSpecialChars=false) | |
| This function accepts an array of data (or a single element), and "cleans it up" in preparation for use as a JSON string. | |
| call_curl ($in_uri, $in_post=true, &$http_status=null) | |
| This is a function that returns the results of an HTTP call to a URI. It is a lot more secure than file_get_contents, but does the same thing. | |
| c_comdef_admin_bar ($in_http_vars) | |
| Returns the HTML for an "Admin Bar" along the top of the page. | |
| c_comdef_htmlspecialchars ($in_string) | |
| This function creates a displayable string. | |
| c_comdef_vet_email_address ($in_address) | |
| This function vets the email address for proper form. | |
| c_comdef_LogoutUser () | |
| This function can be called to terminate the session. | |
Some basic utility classes and functions to be used throughout the CoMDEF system.
These classes and functions describe some basic functionality that is used throughout the system.
| c_comdef_admin_bar | ( | $ | in_http_vars | ) |
Returns the HTML for an "Admin Bar" along the top of the page.
| in_http_vars | The aggregation of the $_GET and $_POST superglobals, as an associative array. |
| c_comdef_htmlspecialchars | ( | $ | in_string | ) |
This function creates a displayable string.
Referenced by BuildFormats(), BuildLocation(), BuildTime(), BuildTown(), c_comdef_admin_bar(), c_comdef_LoginForm(), c_comdef_change::DetailedChangeDescription(), DisplayAdvancedSearchDiv(), DisplayChangedMeetingReports(), DisplayDataEditor(), DisplayDeletedMeetingReports(), DisplayFormatsForEdit(), DisplayMeeting(), DisplayMeetingForEdit(), DisplayMeetingForm(), DisplayMeetingSearchForm(), DisplayNewMeetingForm(), DisplayOneMeeting(), DisplayOneServiceBodyEditor(), DisplayOneUserForEditing(), DisplayPageData(), DisplayResultNav(), DisplaySearchResultsList(), DisplaySearchResultsMap(), DisplaySingleMeeting(), DisplayUserEditor(), GetControlPanelHTML(), GetHeaderXHTML(), json_prepare(), and ReturnAServiceBodyDL().
| c_comdef_LogoutUser | ( | ) |
This function can be called to terminate the session.
| c_comdef_vet_email_address | ( | $ | in_address | ) |
This function vets the email address for proper form.
| call_curl | ( | $ | in_uri, |
| $ | in_post = true, |
||
| &$ | http_status = null |
||
| ) |
This is a function that returns the results of an HTTP call to a URI. It is a lot more secure than file_get_contents, but does the same thing.
| an | exception if the call fails. |
| in_uri | A string. The URI to call. |
| in_post | If false, the transaction is a GET, not a POST. Default is true. |
| http_status | Optional reference to a string. Returns the HTTP call status. |
Referenced by GetGeocodeFromString().
| FullCrypt | ( | $ | in_string, |
| $ | in_salt = null, |
||
| &$ | crypt_method = null |
||
| ) |
Encrypts a string, using the most effective encryption.
This function will encrypt a string, using the standard PHP crypt() function, and, if asked, will use the most secure algorithm available on the server. This is a one-way encryption.
NOTE: If you use this in "secure" mode (other than CRYPT_DES), it may deliver passwords in a format that cannot be ported to other servers.
| in_string | The string to be encrypted |
| in_salt | This is the original password, in encrypted form (used as a salt). If this is provided, the $crypt_method parameter is ignored.. |
| crypt_method | Optional. If provided, the encryption constant will be returned. If the crypt method is requested, this should be set to true. The value will be replaced by the constant for the method used. |
Values:
NOTE: If you provide a specific value, and the server cannot provide it, CRYPT_DES will be used.
Referenced by c_comdef_server::AddNewUser(), c_comdef_users::GetEncryptedPW(), c_comdef_user::IsUser(), c_comdef_user::SetNewPassword(), and SetPageFive().
| json_prepare | ( | $ | data, |
| $ | escapeSpecialChars = false |
||
| ) |
This function accepts an array of data (or a single element), and "cleans it up" in preparation for use as a JSON string.
Referenced by ApplyDataItem(), DeleteMeetings(), DuplicateMeetings(), and UnpublishMeetings().
| SplitIntoMetaphone | ( | $ | in_string, |
| $ | in_lang_enum = null, |
||
| $ | in_literal = false |
||
| ) |
Converts a string into an array of metaphone entities.
This breaks up the given string into metaphone keys, and returns them in an array, so they can be easily compared.
http://us2.php.net/manual/en/function.metaphone.php
If no language is given, we use the server's native language.
We use the metaphone as the array value. The string is the key. This also makes it a bit more efficient if a repeated string is provided.
We also have a Spanish version of metaphone() available.
| in_string | The string to split up. |
| in_lang_enum | This is the code for the desired language. If not given, the server localization will be used. |
| in_literal | If this is set to true (default is false), then metaphone will not be used. |
Referenced by c_comdef_formats::GetFormatsByString(), c_comdef_meetings::GetMeetingsByKeyValue(), and c_comdef_meetings::GetMeetingsByString().
1.7.4