PHP Class get, nodejs-autorestart

Mostra file Open project: shimondoodkin/nodejs-autorestart Class Usage Examples

Public Properties

Property Type Description
$config object Opens up public access to config constants and variables and the cache object
$loadedObjects array Index of objects loaded, used to maintain uniqueness of singletons

Public Methods

Method Description
helper ( $helper ) : object Returns a helper object
htmlentities ( string $string, integer $quoteStyle = ENT_COMPAT, string $charset = 'UTF-8', boolean $doubleEncode = false ) : string Overloads the php function htmlentities and changes the default charset to UTF-8 and the default value for the fourth parameter $doubleEncode to false. Also adds ability to pass a null value to get the default $quoteStyle and $charset (removes need to repeatedly define ENT_COMPAT, 'UTF-8', just to access the $doubleEncode argument)
xhtmlentities ( string $string, integer $quoteStyle = ENT_NOQUOTES, string $charset = 'UTF-8', boolean $doubleEncode = false ) : string Converts special characters in a string to XHTML-valid ASCII encoding the same as htmlentities except this method allows the use of HTML tags within your string. Signature is the same as htmlentities except that the only character sets available (third argument) are UTF-8 (default) and ISO-8859-1 (Latin-1).

Protected Methods

Method Description
_loadObject ( string $objectType, string $objectName ) : object Loads an object as a singleton
initXhtmlentities ( integer $quoteStyle, string $charset, boolean $doubleEncode ) Initialize the character maps needed for the xhtmlentities() method and verifies the argument values passed to it are valid.

Method Details

_loadObject() protected static method

Loads an object as a singleton
protected static _loadObject ( string $objectType, string $objectName ) : object
$objectType string
$objectName string
return object

helper() public static method

Returns a helper object
public static helper ( $helper ) : object
return object

htmlentities() public static method

If you are using a PHP version prior to 5.2.3 the $doubleEncode parameter is not available so you will need to comment out the last parameter in the return clause (including the preceding comma)
public static htmlentities ( string $string, integer $quoteStyle = ENT_COMPAT, string $charset = 'UTF-8', boolean $doubleEncode = false ) : string
$string string
$quoteStyle integer Uses ENT_COMPAT if null or omitted
$charset string Uses UTF-8 if null or omitted
$doubleEncode boolean
return string

initXhtmlentities() protected static method

Initialize the character maps needed for the xhtmlentities() method and verifies the argument values passed to it are valid.
protected static initXhtmlentities ( integer $quoteStyle, string $charset, boolean $doubleEncode )
$quoteStyle integer
$charset string Only valid options are UTF-8 and ISO-8859-1 (Latin-1)
$doubleEncode boolean

xhtmlentities() public static method

Converts special characters in a string to XHTML-valid ASCII encoding the same as htmlentities except this method allows the use of HTML tags within your string. Signature is the same as htmlentities except that the only character sets available (third argument) are UTF-8 (default) and ISO-8859-1 (Latin-1).
public static xhtmlentities ( string $string, integer $quoteStyle = ENT_NOQUOTES, string $charset = 'UTF-8', boolean $doubleEncode = false ) : string
$string string
$quoteStyle integer Constants available are ENT_NOQUOTES (default), ENT_QUOTES, ENT_COMPAT
$charset string Only valid options are UTF-8 (default) and ISO-8859-1 (Latin-1)
$doubleEncode boolean Default is false
return string

Property Details

$config public_oe static_oe property

Opens up public access to config constants and variables and the cache object
public static object $config
return object

$loadedObjects public_oe static_oe property

Index of objects loaded, used to maintain uniqueness of singletons
public static array $loadedObjects
return array