PHPDevShell 3.1.3-Stable
PHP OOP RAD Development Framework
PHPDS_core Class Reference
Inheritance diagram for PHPDS_core:
PHPDS_dependant

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_whatThe string required to output or convert.
string$domainOverride 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_pathProvide path like 'test/testpath'
Returns:
string
activePlugin ( )

Function to return the current running/active plugin.

Returns:
string
activeTemplate ( )

Function to return the current running/active template.

Returns:
string
alertLink ( alert_msg)

This shows a simple "alert" box which notifies the user about a specified condition.

Parameters:
stringThe 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:
stringThe 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:
stringWhat 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:
stringWhat 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$lengthThe lenght the string should be.
boolean$uppercase_onlyShould 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$charsetWhether 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$timestampUnix timestamp if empty it will return the current users time.
string$format_type_or_customUser can choose which of the formats to load from the $this->configuration settings, 'default', 'short' or have a custom format.
string$custom_timezoneYou 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:
stringThe string to check whether variable or constant.
Returns:
string The actual assigned constant value.
Author:
Jason Schoeman
loadCoreLanguage ( )

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
booleanShould the file be required or else included.
booleanIs this a relative path, if true, it will be converted to absolute path.
booleanShould it be called only once?
Returns:
mixed, whatever the file returned when executed or false if it couldn't be found
loadMenuLanguage ( )

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:
stringThis is the location where language mo file is found.
stringThe mo filename the translation is compiled in.
stringThe actual text domain identifier.
Author:
Jason Schoeman
logConfig ( )

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:
stringTo convert to integer.
Returns:
integer
Author:
Jason Schoeman
replaceAccents ( string)

Replaces accents with plain text for a given string.

Parameters:
string$string
rightTrim ( str,
remove = null 
)

Strip a string from the end of a string. Is there no such function in PHP?

Parameters:
string$strThe input string.
string$removeOPTIONAL 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$replaceReplace 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$replaceUse 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:
 All Data Structures Files Functions Variables Enumerations