Zikula: A Flexible Open Source Content Management System
home | forum | international support | contact us

Docs for page pnAPI.php

Procedural File: pnAPI.php

Source Location: /pnAPI.php

Classes:



Page Details:

Zikula Application Framework



Tags:

version:  $Id: pnAPI.php 24383 2008-06-12 14:15:02Z markwest $
copyright:  (c) 2001, Zikula Development Team
link:  http://www.zikula.org
license:  GNU/GPL







PNMODULE_DEPENDENCY_CONFLICTS [line 39]

PNMODULE_DEPENDENCY_CONFLICTS = 3



[ Top ]



PNMODULE_DEPENDENCY_RECOMMENDED [line 38]

PNMODULE_DEPENDENCY_RECOMMENDED = 2



[ Top ]



PNMODULE_DEPENDENCY_REQUIRED [line 37]

PNMODULE_DEPENDENCY_REQUIRED = 1
Module dependency states




[ Top ]



PNMODULE_STATE_ACTIVE [line 29]

PNMODULE_STATE_ACTIVE = 3



[ Top ]



PNMODULE_STATE_INACTIVE [line 28]

PNMODULE_STATE_INACTIVE = 2



[ Top ]



PNMODULE_STATE_INVALID [line 32]

PNMODULE_STATE_INVALID = -1



[ Top ]



PNMODULE_STATE_MISSING [line 30]

PNMODULE_STATE_MISSING = 4



[ Top ]



PNMODULE_STATE_UNINITIALISED [line 27]

PNMODULE_STATE_UNINITIALISED = 1
State of modules




[ Top ]



PNMODULE_STATE_UPGRADED [line 31]

PNMODULE_STATE_UPGRADED = 5



[ Top ]



PNNO [line 22]

PNNO = 0



[ Top ]



PNPERMS_ALL [line 44]

PNPERMS_ALL = '-1'
'All' and 'unregistered' for user and group permissions




[ Top ]



PNPERMS_UNREGISTERED [line 45]

PNPERMS_UNREGISTERED = '0'



[ Top ]



PNYES [line 21]

PNYES = 1
Yes/no integer




[ Top ]



PN_CONFIG_MODULE [line 58]

PN_CONFIG_MODULE = '/PNConfig'
Fake module for config vars




[ Top ]



PN_CORE_ADODB [line 65]

PN_CORE_ADODB = 2



[ Top ]



PN_CORE_AJAX [line 73]

PN_CORE_AJAX = 512



[ Top ]



PN_CORE_ALL [line 76]

PN_CORE_ALL = 4095



[ Top ]



PN_CORE_CONFIG [line 64]

PN_CORE_CONFIG = 1



[ Top ]



PN_CORE_DB [line 66]

PN_CORE_DB = 4



[ Top ]



PN_CORE_DECODEURLS [line 74]

PN_CORE_DECODEURLS = 1024



[ Top ]



PN_CORE_LANGS [line 70]

PN_CORE_LANGS = 64



[ Top ]



PN_CORE_MODS [line 71]

PN_CORE_MODS = 128



[ Top ]



PN_CORE_NONE [line 63]

PN_CORE_NONE = 0
Core initialisation stages




[ Top ]



PN_CORE_OBJECTLAYER [line 67]

PN_CORE_OBJECTLAYER = 8



[ Top ]



PN_CORE_SESSIONS [line 69]

PN_CORE_SESSIONS = 32



[ Top ]



PN_CORE_TABLES [line 68]

PN_CORE_TABLES = 16



[ Top ]



PN_CORE_THEME [line 75]

PN_CORE_THEME = 2048



[ Top ]



PN_CORE_TOOLS [line 72]

PN_CORE_TOOLS = 256



[ Top ]



PN_VERSION_ID [line 52]

PN_VERSION_ID = 'Zikula'



[ Top ]



PN_VERSION_NUM [line 51]

PN_VERSION_NUM = '1.0.0'
Core version informations - should be upgraded on each release for

better control on config settings





[ Top ]



PN_VERSION_SUB [line 53]

PN_VERSION_SUB = 'adam_baum'



[ Top ]




GetUserTime [line 1072]

mixed GetUserTime( $time, time $)

get a Time String in the right format



Tags:

return:  string if successfull, false if not


Parameters

time   $   - prefix string
   $time  
[ Top ]



pnADODBInit [line 1149]

void pnADODBInit( )

initialise ADODB





[ Top ]



pnConfigDelVar [line 144]

mixed pnConfigDelVar( $name, name $)

delete a configuration variable



Tags:

return:  value of deleted config var or false on failure


Parameters

name   $   the name of the variable
   $name  
[ Top ]



pnConfigGetVar [line 90]

mixed pnConfigGetVar( $name, [default $default = null], name $)

get a configuration variable



Tags:

return:  value of the variable, or false on failure


Parameters

name   $   the name of the variable
default   $default   the default value to return if the requested param is not set
   $name  
[ Top ]



pnConfigSetVar [line 118]

bool pnConfigSetVar( $name, [ $value = ''], value $)

set a configuration variable



Tags:

return:  true on success, false on failure


Parameters

value   $   the value of the variable
   $name  
   $value  
[ Top ]



pnDBGetConn [line 468]

array pnDBGetConn( [bool $pass_by_reference = false], [string $fetchmode = ADODB_FETCH_NUM])

get a list of database connections



Tags:

return:  array of database connections
author:  Roger Raymond
author:  Eric Barr
copyright:  Copyright (c) 2003 Envolution; Eric Barr. All rights reserved.


Parameters

bool   $pass_by_reference   default = false
string   $fetchmode   set ADODB fetchmode ADODB_FETCH_NUM, ADODB_FETCH_ASSOC, ADODB_FETCH_DEFAULT, ADODB_FETCH_BOTH
[ Top ]



pnDBGetTableOptions [line 506]

void pnDBGetTableOptions( [ $tablename = ''])





Parameters

   $tablename  
[ Top ]



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:

author:  Mark West
since:  1.103


Parameters

table   $table   - table name
[ Top ]



pnDBGetTables [line 489]

array pnDBGetTables( )

get a list of database tables



Tags:

return:  array of database tables
author:  Roger Raymond
author:  Eric Barr
copyright:  Copyright (c) 2003 Envolution; Eric Barr. All rights reserved.


[ Top ]



pnDBInit [line 453]

bool pnDBInit( )

Initialise DB connection



Tags:

return:  true if successful, false otherwise


[ Top ]



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:

author:  Eric Barr
copyright:  Copyright (c) 2003 Envolution; Eric Barr. All rights reserved.
access:  public


Parameters

array   $newtables  
[ Top ]



pnErrorHandler [line 1462]

void pnErrorHandler( $errno, $errstr, $errfile, $errline, $errcontext)





Parameters

   $errno  
   $errstr  
   $errfile  
   $errline  
   $errcontext  
[ Top ]



pnGetBaseURI [line 954]

string pnGetBaseURI( )

get base URI for Zikula



Tags:

return:  base URI for Zikula
author:  Martin Andersen


[ Top ]



pnGetBaseURL [line 979]

string pnGetBaseURL( )

get base URL for Zikula



Tags:

return:  base URL for Zikula


[ Top ]



pnGetCurrentURI [line 1240]

string pnGetCurrentURI( [args $args = array()])

Get current URI (and optionally add/replace some parameters)



Tags:

return:  current URI
access:  public


Parameters

args   $args   array additional parameters to be added to/replaced in the URI (e.g. theme, ...)
[ Top ]



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:

return:  current URL
todo:  cfr. BaseURI() for other possible ways, or try PHP_SELF
access:  public


Parameters

args   0   array additional parameters to be added to/replaced in the URL (e.g. theme, ...)
[ Top ]



pnGetHost [line 1221]

string pnGetHost( )

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:

return:  HTTP host name
author:  Marco Canini <marco@xaraya.com>
access:  public


[ Top ]



pnGetStatusMsg [line 934]

string pnGetStatusMsg( )

get status message from previous operation

Obtains any status message, and also destroys it from the session to prevent duplication




Tags:

return:  the status message
see:  Logutil.class.php
deprecated:  


[ Top ]



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:

return:  true initialisation successful false otherwise


Parameters

   $stages  
[ Top ]



pnLocalReferer [line 1046]

bool pnLocalReferer( [bool $strict = false])

check to see if this is a local referral



Tags:

return:  true if locally referred, false if not


Parameters

bool   $strict   strict - strict checking ensures that a referer must be set as well as local
[ Top ]



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:

return:  true if the email was sent, false if not
deprecated:  


Parameters

debug   $   - if 1, echo mail content
   $to  
   $subject  
   $message  
   $headers  
   $html  
   $debug  
[ Top ]



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:

deprecated:  


Parameters

   $vercheck  
[ Top ]



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:

return:  true if successful, false otherwise
author:  Mark West


Parameters

   $name  
   $value  
[ Top ]



pnRedirect [line 1003]

bool pnRedirect( string $redirecturl, [ $additionalheaders = array()], array $addtionalheaders)

Carry out a redirect



Tags:

return:  true if redirect successful, false otherwise


Parameters

string   $redirecturl   URL to redirect to
array   $addtionalheaders   array of header strings to send with redirect
   $additionalheaders  
[ Top ]



pnServerGetProtocol [line 1309]

string pnServerGetProtocol( )

Gets the current protocol

Returns the HTTP protocol used by current connection, it could be 'http' or 'https'.




Tags:

return:  current HTTP protocol
author:  Marco Canini <marco@xaraya.com>
access:  public


[ Top ]



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:

return:  value of the variable
author:  Marco Canini <marco@xaraya.com>, Michel Dalle
access:  public


Parameters

name   $name   string the name of the variable
default   $default   the default value to return if the requested param is not set
[ Top ]



pnShutDown [line 1547]

none pnShutDown( [$exit_param $exit_param = ''])

Gracefully shut down the framework (traps all exit and die calls)



Tags:

return:  - function halts execution
author:  drak


Parameters

$exit_param   $exit_param   params to pass to the exit function
[ Top ]



pnVarCensor [line 787]

void pnVarCensor( )

remove censored words





[ Top ]



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:

return:  prepared variable if only one variable passed in, otherwise an array of prepared variables
see:  FormUtil::getPassedValues
deprecated:  


Parameters

var   $   name of variable to get
$   1   ...
[ Top ]



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:

return:  prepared variable if only one variable passed in, otherwise an array of prepared variables
see:  DataUtil::formatForDisplay
deprecated:  


Parameters

var   $   variable to prepare
$   1   ...
[ Top ]



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:

return:  prepared variable if only one variable passed in, otherwise an array of prepared variables
see:  DataUtil::formatForOS()
deprecated:  


Parameters

var   $   variable to prepare
$   1   ...
[ Top ]



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:

return:  prepared variable if only one variable passed in, otherwise an array of prepared variables
see:  DataUtil::formatForStore()
deprecated:  


Parameters

var   $   variable to prepare
$   1   ...
[ Top ]



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:

return:  prepared variable if only one variable passed in, otherwise an array of prepared variables
author:  Xaraya development team
see:  DataUtil::formatForDisplayHTML
deprecated:  


Parameters

var   0   variable to prepare
...   1  
[ Top ]



pnVarValidate [line 818]

bool pnVarValidate( $var $var, $type $type, $args $args)

validate a zikula variable



Tags:

return:  true if the validation was successful, false otherwise
author:  Damien Bonvillain
author:  Gregor J. Rothfuss
author:  J�rg Napp
since:  1.23 - 2002/02/01
access:  public


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...)
[ Top ]


Packages:

Files:

Classes: