dgettext (line 314)
void
dgettext
( $domain, $text)
fnmatch (line 720)
void
fnmatch
( $pattern, $string, [ $flags = 0])
gettext (line 309)
void
gettext
( $text)
pcre_fnmatch (line 725)
void
pcre_fnmatch
( $pattern, $string, [ $flags = 0])
PU_addIncludePath (line 565)
Add an include path to check in for classes.
void
PU_addIncludePath
(string $path)
PU_ArraySearch (line 218)
Search for array values inside array and returns key.
mixed
PU_ArraySearch
(array $needle, array $haystack)
-
array
$needle
-
array
$haystack
PU_array_compact (line 481)
Get rid of null values inside an array
All values which are null in the array are remove, shortening the array
void
PU_array_compact
( $a)
-
array
$a: the array to compact
PU_BuildAttrString (line 84)
Build a xml-style attributes string based on an array
string
PU_BuildAttrString
([ $attributes = null], [$glue $glue = ''])
-
$attributes
$attributes: array, the attribute array to compile
-
$glue
$glue: string, a piece of string to insert between the values
PU_BuildGET (line 69)
Build GET part of a url
string
PU_BuildGET
([$includeInGet $includeInGet = null], [$excludeFromGet $excludeFromGet = null], [ $glue = '&'])
-
$includeInGet
$includeInGet: (optional) array of pairs: parameters to add as GET in the url
-
$excludeFromGet
$excludeFromGet: (optional) array of strings: parameters to remove from GET in the url
-
$glue
PU_BuildGETArray (line 28)
Build array from get url.
TODO: it's probably faster to use PHP build-in function (array_merge...)
array
PU_BuildGETArray
( $myGET, [array $includeInGet = null], [array $excludeFromGet = null])
-
array
$myGET
-
array
$includeInGet
-
array
$excludeFromGet
PU_BuildGETString (line 50)
Creates a (string) url to be used with GET, including encoding
string
PU_BuildGETString
( $myGET, [string $glue = '&'])
-
array
$myGET
-
string
$glue
PU_BuildHREF (line 167)
Build a html link (A+HREF html tag) with label and url and GET parameters
string
PU_BuildHREF
($label $label, [$includeInGet $includeInGet = null], [$excludeFromGet $excludeFromGet = null], [$target $target = null], [ $attrs = null])
-
$label
$label: string: the text of the link
-
$includeInGet
$includeInGet: (optional) array of pairs: parameters to add as GET in the url
-
$excludeFromGet
$excludeFromGet: (optional) array of strings: parameters to remove from GET in the url
-
$target
$target: (optional) string: the target script url (current script if missing)
-
array
$attrs
PU_buildHTMLoptions (line 548)
Create a html string of <options> from an associative array
string
PU_buildHTMLoptions
(array $a, [string|array $selected = null])
-
array
$a
-
string|array
$selected: which key(s) should be marked as "selected" (optional)
PU_buildParsedURL (line 101)
Builds a parsed url.
string
PU_buildParsedURL
(array $p)
PU_BuildURL (line 140)
Build a url with GET parameters
string
PU_BuildURL
([string|array $target = null], [array $includeInGet = null], [array $excludeFromGet = null], [ $glue = '&amp;'])
-
string|array
$target: (optional) string: the target script url (current script if missing)
-
array
$includeInGet: (optional) array of pairs: parameters to add as GET in the url
-
array
$excludeFromGet: (optional) array of strings: parameters to remove from GET in the url
-
$glue
PU_cleanBuffers (line 384)
Get rid of all buffer, optionaly flushing (i.e. writing to the browser) Default behavior is to ignore.
void
PU_cleanBuffers
([boolean $flush = false])
-
boolean
$flush: do we flush or ignore?
PU_CleanString (line 186)
Clean a string from possibly harmful chars
These are removed: single and double quotes, backslashes, optionnaly html tags (everything between < and >)
A cleaned string should be safe to include in an html output
string
PU_CleanString
($string $string, [$clean_htlm $clean_htlm = false])
-
$string
$string: the string to clean
-
$clean_htlm
$clean_htlm: if true, HTML tags are deleted too
PU_dumpArray (line 360)
Outputs an array in html
A slightly better version of print_r()
void
PU_dumpArray
(array $a, [string $title = null], [boolean $htmlize = false])
-
array
$a
-
string
$title
-
boolean
$htmlize: (default to false) if true html is escaped to be displayed as source
PU_exitToAJAX (line 467)
OBSOLETE don't use
void
PU_exitToAJAX
($data $data)
PU_isAJAX (line 430)
Determines if the current request has been made by some kind of ajax call (i.e. XMLHttpRequest)
boolean
PU_isAJAX
([boolean $json = false])
-
boolean
$json: set to true if you want to force the request's result as json
PU_isJSON (line 453)
Checks for a json context and if so, outputs data
boolean,
PU_isJSON
($data $data, [$force $force = false])
-
$data
$data: mixed, the data to be encoded and sent
-
$force
$force: boolean, (optionnal) do we pretend it's json context even if it's not?
PU_MakeString (line 201)
Convert a string to UTF8 (default) or to HTML
string
PU_MakeString
($string $string, [$htmlize $htmlize = false])
-
$string
$string: the string to convert
-
$htmlize
$htmlize: if true the string is converted to HTML, otherwise to UTF8
PU_silentHeader (line 413)
Add a header if and only if headers have not been sent yet
nothing
PU_silentHeader
(string $header)
-
string
$header: the header string to add
PU_sprintfn (line 507)
version of sprintf for cases where named arguments are desired (python syntax)
with sprintf: sprintf('second: %2$s ; first: %1$s', '1st', '2nd');
with sprintfn: sprintfn('second: %(second)s ; first: %(first)s', array( 'first' => '1st', 'second'=> '2nd' ));
string|false
PU_sprintfn
(string $format, [ $args = array()])
-
string
$format: sprintf format string, with any number of named arguments
-
array
$args: array of [ 'arg_name' => 'arg value', ... ] replacements to be made
textdomain (line 339)
void
textdomain
( $textdomain)
_ (line 319)
void
_
( $text)
_e (line 281)
This function echos the returning text.
void
_e
(text $text)
__ (line 253)
Wrapper for $core->__() method.
Converts text to use gettext PO system. Does the same as $core->__();
string
__
( $gettext, [string $domain = false], string $say_what)
-
string
$say_what: The string required to output or convert.
-
string
$domain: Override textdomain that should be looked under for this text string.
-
$gettext
__e (line 291)
This function echos the returning text inside a domain.
void
__e
(text $text, $domain)
___ (line 271)
Specifically meant for core translation domain.
string
___
( $gettext, string $say_what)
-
string
$say_what: The string required to output or convert.
-
$gettext