Procedural File: pnAPI.php
Source Location: /pnAPI.php
Page Details:
Zikula Application Framework
Tags:
PNMODULE_DEPENDENCY_CONFLICTS [line 39]
PNMODULE_DEPENDENCY_RECOMMENDED [line 38]
PNMODULE_DEPENDENCY_REQUIRED [line 37]
PNMODULE_STATE_ACTIVE [line 29]
PNMODULE_STATE_INACTIVE [line 28]
PNMODULE_STATE_INVALID [line 32]
PNMODULE_STATE_MISSING [line 30]
PNMODULE_STATE_UNINITIALISED [line 27]
PNMODULE_STATE_UPGRADED [line 31]
PNNO [line 22]
PNPERMS_ALL [line 44]
PNPERMS_UNREGISTERED [line 45]
PNYES [line 21]
PN_CONFIG_MODULE [line 58]
PN_CORE_ADODB [line 65]
PN_CORE_AJAX [line 73]
PN_CORE_ALL [line 76]
PN_CORE_CONFIG [line 64]
PN_CORE_DB [line 66]
PN_CORE_DECODEURLS [line 74]
PN_CORE_LANGS [line 70]
PN_CORE_MODS [line 71]
PN_CORE_NONE [line 63]
PN_CORE_OBJECTLAYER [line 67]
PN_CORE_SESSIONS [line 69]
PN_CORE_TABLES [line 68]
PN_CORE_THEME [line 75]
PN_CORE_TOOLS [line 72]
PN_VERSION_ID [line 52]
PN_VERSION_NUM [line 51]
PN_VERSION_SUB [line 53]
GetUserTime [line 1072]
mixed GetUserTime(
$time, time $)
|
|
get a Time String in the right format
Tags:
Parameters
| time |
$ |
- prefix string |
| |
$time |
|
pnADODBInit [line 1149]
pnConfigDelVar [line 144]
mixed pnConfigDelVar(
$name, name $)
|
|
delete a configuration variable
Tags:
Parameters
| name |
$ |
the name of the variable |
| |
$name |
|
pnConfigGetVar [line 90]
mixed pnConfigGetVar(
$name, [default $default = null], name $)
|
|
get a configuration variable
Tags:
Parameters
| name |
$ |
the name of the variable |
| default |
$default |
the default value to return if the requested param is not set |
| |
$name |
|
pnConfigSetVar [line 118]
bool pnConfigSetVar(
$name, [ $value = ''], value $)
|
|
set a configuration variable
Tags:
Parameters
| value |
$ |
the value of the variable |
| |
$name |
|
| |
$value |
|
pnDBGetConn [line 468]
array pnDBGetConn(
[bool $pass_by_reference = false], [string $fetchmode = ADODB_FETCH_NUM])
|
|
get a list of database connections
Tags:
Parameters
| bool |
$pass_by_reference |
default = false |
| string |
$fetchmode |
set ADODB fetchmode ADODB_FETCH_NUM, ADODB_FETCH_ASSOC, ADODB_FETCH_DEFAULT, ADODB_FETCH_BOTH |
pnDBGetTableOptions [line 506]
void pnDBGetTableOptions(
[ $tablename = ''])
|
|
Parameters
pnDBGetTablePrefix [line 589]
void pnDBGetTablePrefix(
table $table)
|
|
get table prefix
get's the database prefix for the current site
In a non multisite scenario this will be the 'prefix' config var from config/config.php. For a multisite configuration the multistes module will manage the prefixes for a given table
The table name parameter is the table name to get the prefix for minus the prefix and seperating _ e.g. pnDBGetPrefix returns pn_modules for pnDBGetPrefix('modules');
Tags:
Parameters
| table |
$table |
- table name |
pnDBGetTables [line 489]
get a list of database tables
Tags:
pnDBInit [line 453]
Initialise DB connection
Tags:
pnDBSetTables [line 551]
void pnDBSetTables(
array $newtables)
|
|
Creates the database table listing if it hasn't been created yet and merges new table listings into the master list.
Tags:
Parameters
pnErrorHandler [line 1462]
void pnErrorHandler(
$errno, $errstr, $errfile, $errline, $errcontext)
|
|
Parameters
| |
$errno |
|
| |
$errstr |
|
| |
$errfile |
|
| |
$errline |
|
| |
$errcontext |
|
pnGetBaseURI [line 954]
get base URI for Zikula
Tags:
pnGetBaseURL [line 979]
get base URL for Zikula
Tags:
pnGetCurrentURI [line 1240]
string pnGetCurrentURI(
[args $args = array()])
|
|
Get current URI (and optionally add/replace some parameters)
Tags:
Parameters
| args |
$args |
array additional parameters to be added to/replaced in the URI (e.g. theme, ...) |
pnGetCurrentURL [line 1327]
string pnGetCurrentURL(
[args 0 = array additional parameters to be added to/replaced in the URL (e.g. theme, ...)])
|
|
Get current URL
Tags:
Parameters
| args |
0 |
array additional parameters to be added to/replaced in the URL (e.g. theme, ...) |
pnGetHost [line 1221]
Gets the host name
Returns the server host name fetched from HTTP headers when possible. The host name is in the canonical form (host + : + port) when the port is different than 80.
Tags:
pnGetStatusMsg [line 934]
get status message from previous operation
Obtains any status message, and also destroys it from the session to prevent duplication
Tags:
pnInit [line 178]
bool pnInit(
[ $stages = PN_CORE_ALL])
|
|
Initialise Zikula
Carries out a number of initialisation tasks to get Zikula up and running.
Tags:
Parameters
pnLocalReferer [line 1046]
bool pnLocalReferer(
[bool $strict = false])
|
|
check to see if this is a local referral
Tags:
Parameters
| bool |
$strict |
strict - strict checking ensures that a referer must be set as well as local |
pnMail [line 1102]
bool pnMail(
$to, $subject, [ $message = ''], [ $headers = ''], $html, $debug, debug $)
|
|
send an email
e-mail messages should now be send with a pnModAPIFunc call to the mailer module
Tags:
Parameters
| debug |
$ |
- if 1, echo mail content |
| |
$to |
|
| |
$subject |
|
| |
$message |
|
| |
$headers |
|
| |
$html |
|
| |
$debug |
|
pnPhpVersionCheck [line 1132]
void pnPhpVersionCheck(
[ $vercheck = ''])
|
|
Function that compares the current php version on the system with the target one
Deprecate function reverting to php detecion function
Tags:
Parameters
pnQueryStringSetVar [line 1448]
bool pnQueryStringSetVar(
$name, $value)
|
|
add a variable/value pair into the query string (really the _GET superglobal This API also adds the variable to the _REQUEST superglobal for consistentcy
Tags:
Parameters
pnRedirect [line 1003]
bool pnRedirect(
string $redirecturl, [ $additionalheaders = array()], array $addtionalheaders)
|
|
Carry out a redirect
Tags:
Parameters
| string |
$redirecturl |
URL to redirect to |
| array |
$addtionalheaders |
array of header strings to send with redirect |
| |
$additionalheaders |
|
pnServerGetProtocol [line 1309]
string pnServerGetProtocol(
)
|
|
Gets the current protocol
Returns the HTTP protocol used by current connection, it could be 'http' or 'https'.
Tags:
pnServerGetVar [line 1202]
mixed pnServerGetVar(
name $name, [default $default = null])
|
|
Gets a server variable
Returns the value of $name from $_SERVER array. Accepted values for $name are exactly the ones described by the PHP manual. If the server variable doesn't exist void is returned.
Tags:
Parameters
| name |
$name |
string the name of the variable |
| default |
$default |
the default value to return if the requested param is not set |
pnShutDown [line 1547]
none pnShutDown(
[$exit_param $exit_param = ''])
|
|
Gracefully shut down the framework (traps all exit and die calls)
Tags:
Parameters
| $exit_param |
$exit_param |
params to pass to the exit function |
pnVarCensor [line 787]
pnVarCleanFromInput [line 619]
mixed pnVarCleanFromInput(
var $, $ 1)
|
|
clean user input
Gets a global variable, cleaning it up to try to ensure that hack attacks don't work
Tags:
Parameters
| var |
$ |
name of variable to get |
| $ |
1 |
... |
pnVarPrepForDisplay [line 670]
mixed pnVarPrepForDisplay(
var $, $ 1)
|
|
ready user output
Gets a variable, cleaning it up such that the text is shown exactly as expected
Tags:
Parameters
| var |
$ |
variable to prepare |
| $ |
1 |
... |
pnVarPrepForOS [line 765]
mixed pnVarPrepForOS(
var $, $ 1)
|
|
ready operating system output
Gets a variable, cleaning it up such that any attempts to access files outside of the scope of the Zikula system is not allowed.
Tags:
Parameters
| var |
$ |
variable to prepare |
| $ |
1 |
... |
pnVarPrepForStore [line 733]
mixed pnVarPrepForStore(
var $, $ 1)
|
|
ready database output
Gets a variable, cleaning it up such that the text is stored in a database exactly as expected
Tags:
Parameters
| var |
$ |
variable to prepare |
| $ |
1 |
... |
pnVarPrepHTMLDisplay [line 702]
string/array pnVarPrepHTMLDisplay(
var 0, ... 1)
|
|
ready HTML output
Gets a variable, cleaning it up such that the text is shown exactly as expected, except for allowed HTML tags which are allowed through
Tags:
Parameters
| var |
0 |
variable to prepare |
| ... |
1 |
|
pnVarValidate [line 818]
bool pnVarValidate(
$var $var, $type $type, $args $args)
|
|
validate a zikula variable
Tags:
Parameters
| $var |
$var |
the variable to validate |
| $type |
$type |
the type of the validation to perform (email, url etc.) |
| $args |
$args |
optional array with validation-specific settings (never used...) |