Public Member Functions |
| | confirmLink ($confirm_what) |
| | confirmSubmit ($confirm_what) |
| | alertSubmit ($alert_msg) |
| | alertLink ($alert_msg) |
| | isConstant ($is_variable_constant) |
| | formatTimeDate ($time_stamp, $format_type_or_custom= 'default', $custom_timezone=false) |
| | userServerTzDiff ($custom_timestamp=false) |
| | createRandomString ($length=4, $uppercase_only=false) |
| | formatLocale ($charset=true, $user_language=false, $user_region=false) |
| | loadTranslation ($mo_directory, $mo_filename, $textdomain) |
| | loadCoreLanguage () |
| | loadMenuLanguage () |
| | loadDefaultPluginLanguage () |
| | activePlugin () |
| | activeTemplate () |
| | nameToId ($convert_to_id) |
| | rightTrim ($str, $remove=null) |
| | safeName ($name, $replace= '-') |
| | replaceAccents ($string) |
| | absolutePath ($relative_path) |
| | loadFile ($path, $required=false, $relative=true, $once_only=true) |
| | SearchAndReplaceBetween ($string, $start, $end, $replace= '', $replace_char='%') |
| | __ ($say_what, $domain=false) |
| | logConfig () |
Member Function Documentation
| __ |
( |
$ |
say_what, |
|
|
$ |
domain = false |
|
) |
| |
Method is used to wrap the gettext international language conversion tool inside PHPDevShell. Converts text to use gettext PO system.
- Parameters:
-
| string | $say_what | The string required to output or convert. |
| string | $domain | Override textdomain that should be looked under for this text string. |
- Returns:
- string Will return converted string or same string if not available.
- Author:
- Jason Schoeman
| absolutePath |
( |
$ |
relative_path | ) |
|
Turns any given relative path to the absolute version of the path.
- Parameters:
-
| $relative_path | Provide path like 'test/testpath' |
- Returns:
- string
Function to return the current running/active plugin.
- Returns:
- string
Function to return the current running/active template.
- Returns:
- string
This shows a simple "alert" box which notifies the user about a specified condition.
- Parameters:
-
| string | The actual warning message. |
- Returns:
- string Javascript popup warning box.
- Author:
- Don Schoeman
| alertSubmit |
( |
$ |
alert_msg | ) |
|
This shows a simple "alert" box which notifies the user about a specified condition.
- Parameters:
-
| string | The actual warning message. |
- Returns:
- string Javascript popup warning box.
- Author:
- Don Schoeman
| confirmLink |
( |
$ |
confirm_what | ) |
|
This creates a simple confirmation box to ask users input before performing a critical link click.
- Parameters:
-
| string | What is the question to be asked in the confirmation box. |
- Returns:
- string Javascript popup confirmation box.
- Author:
- Jason Schoeman
| confirmSubmit |
( |
$ |
confirm_what | ) |
|
This creates a simple confirmation box to ask users input before performing a critical submit.
- Parameters:
-
| string | What is the question to be asked in the confirmation box. |
- Returns:
- string Javascript popup confirmation box.
- Author:
- Jason Schoeman
| createRandomString |
( |
$ |
length = 4, |
|
|
$ |
uppercase_only = false |
|
) |
| |
This method creates a random string with mixed alphabetic characters.
- Parameters:
-
| integer | $length | The lenght the string should be. |
| boolean | $uppercase_only | Should the string be uppercase. |
- Returns:
- string Will return required random string.
- Author:
- Andy Shellam, andy [at] andycc [dot] net
| formatLocale |
( |
$ |
charset = true, |
|
|
$ |
user_language = false, |
|
|
$ |
user_region = false |
|
) |
| |
Function formats locale according to logged in user settings else will default to system.
- Parameters:
-
| boolean | $charset | Whether the charset should be included in the format. |
- Returns:
- string Will return formatted locale.
- Author:
- Jason Schoeman
| formatTimeDate |
( |
$ |
time_stamp, |
|
|
$ |
format_type_or_custom = 'default', |
|
|
$ |
custom_timezone = false |
|
) |
| |
This method will return the correct user time taking DST and users timezone into consideration.
- Parameters:
-
| integer | $timestamp | Unix timestamp if empty it will return the current users time. |
| string | $format_type_or_custom | User can choose which of the formats to load from the $this->configuration settings, 'default', 'short' or have a custom format. |
| string | $custom_timezone | You can also provide a custom timezone to this method, if false, it will use current users timezone. |
- Returns:
- string Will return a formatted date string ex. 1 June 2011 18:05 PM
- Author:
- Jason Schoeman
- Version:
- 1.0.1 Converted to OOP
- Date:
- 2009/05/19
| isConstant |
( |
$ |
is_variable_constant | ) |
|
Check and returns constant if constant is defined or returns normal variable if no constant defined.
- Parameters:
-
| string | The string to check whether variable or constant. |
- Returns:
- string The actual assigned constant value.
- Author:
- Jason Schoeman
This method loads the core language array and assigns it to a variable.
- Author:
- Jason Schoeman
| loadDefaultPluginLanguage |
( |
| ) |
|
This method loads the plugin language with default items and icons array.
- Author:
- Jason Schoeman
| loadFile |
( |
$ |
path, |
|
|
$ |
required = false, |
|
|
$ |
relative = true, |
|
|
$ |
once_only = true |
|
) |
| |
Assumes role of loading files.
- Date:
- 20100106 (v1.1) (greg) moved from core to PHPDS_core and added a few checks
- Version:
- 1.1
- Author:
- jason
- Parameters:
-
| string | $file_location | |
| boolean | Should the file be required or else included. |
| boolean | Is this a relative path, if true, it will be converted to absolute path. |
| boolean | Should it be called only once? |
- Returns:
- mixed, whatever the file returned when executed or false if it couldn't be found
This method loads the default menu language array and assigns it to a variable.
- Author:
- Jason Schoeman
| loadTranslation |
( |
$ |
mo_directory, |
|
|
$ |
mo_filename, |
|
|
$ |
textdomain |
|
) |
| |
This methods allows you to load translation by giving their locations and name.
- Parameters:
-
| string | This is the location where language mo file is found. |
| string | The mo filename the translation is compiled in. |
| string | The actual text domain identifier. |
- Author:
- Jason Schoeman
Will log current configuration data to firephp.
- Returns:
- void
| nameToId |
( |
$ |
convert_to_id | ) |
|
Convert string unsigned CRC32 value. This is unique and can help predict a entries id beforehand. Use for folder names insuring unique id's.
- Parameters:
-
| string | To convert to integer. |
- Returns:
- integer
- Author:
- Jason Schoeman
| replaceAccents |
( |
$ |
string | ) |
|
Replaces accents with plain text for a given string.
- Parameters:
-
| rightTrim |
( |
$ |
str, |
|
|
$ |
remove = null |
|
) |
| |
Strip a string from the end of a string. Is there no such function in PHP?
- Parameters:
-
| string | $str | The input string. |
| string | $remove | OPTIONAL string to remove. |
- Returns:
- string the modified string.
| safeName |
( |
$ |
name, |
|
|
$ |
replace = '-' |
|
) |
| |
This method simply renames a string to safe unix standards.
- Parameters:
-
| string | $name | |
| string | $replace | Replace odd characters with what? |
- Returns:
- string
| SearchAndReplaceBetween |
( |
$ |
string, |
|
|
$ |
start, |
|
|
$ |
end, |
|
|
$ |
replace = '', |
|
|
$ |
replace_char = '%' |
|
) |
| |
This is a handy little function to strip out a string between two specified pieces of text. This could be used to parse XML text, bbCode, or any other delimited code/text for that matter. Can also return all text with replaced string between tags.
- Parameters:
-
| string | $string | |
| string | $start | |
| string | $end | |
| string | $replace | Use s to be replaced with the string between tags. |
- Returns:
- string
| userServerTzDiff |
( |
$ |
custom_timestamp = false | ) |
|
The documentation for this class was generated from the following file: