/CORE/system/libs/functions.inc.php

Description

Library including all standard procedures that are explicitely needed for BIGACE.

For further information visit http://www.bigace.de.

  • version: $Id: functions.inc.php,v 1.15 2006/11/26 22:04:19 kpapst Exp $
  • copyright: Copyright (C) 2002-2006 Kevin Papst
  • author: Kevin Papst
  • license: GNU Public License
Functions
createCommandLink (line 152)

Creates a BIGACE Command Link.

  • return: the formatted Link
String createCommandLink (String $cmd, String $id, [array $params = array()], [String $name = ''], [String $address = ''])
  • String $cmd: the BIGACE command
  • String $id: the BIGACE ID
  • array $params: the URL Parameter as key-value mapping
  • String $name: the file name
  • String $address: the Prefix address
createLink (line 112)

Creates any BIGACE Link - allways including the Session ID.

You should use this function to avoid a loose of the User Session in case of not accepted Cookies.

  • return: the created Link
String createLink (array $params, [String $adress = ''])
  • array $params: the Parameter as key-value mapping
  • String $adress: the link address, if non is given the _BIGACE['HOME'] address will be linked
createMenuLink (line 98)

Creates a Link to the given Menu Id.

Uses the function

  1. createLink($params)
.

  • return: the MenuLink
String createMenuLink ([mixed $mid = ''], [array $params = array()], [ $name = ''])
  • mixed $mid: the Menu ID
  • array $params: key - value pairs to append to the link (leave for none)
  • $name
extractVar (line 75)

Searches for the given varname in _POST, _GET, _COOKIE and then in _GLOBALS Variable Scope.

If one is found it will be returned, else the notfound value is returned.

  • return: the varname or notfound if none was given
String extractVar (String $varname, [String $notfound = ''])
  • String $varname: the varname to lookup
  • String $notfound: the varname to return is none was found
getRandomString (line 168)

Returns a random String.

  • return: the Random String
String getRandomString ()
getTranslation (line 61)

Loads an value from the Language File, pass a second parameter for the case the translation cannot be found.

  • return: the translation
String getTranslation (String $name, [String $common = ''])
  • String $name: the translation key
  • String $common: a String being returned if no translation could be found
import (line 219)

Import a class or interface using the java naming syntax.

This method replaces the older

  1. loadClass($subpackage$classname)
, because you can load even files in the Interface (API) folder.

For each file you have to pass the package as well (classes/api), cause its used include path begins one filesystem level higher.

Old:

  1. loadClass('item''Item');
New:
  1. import('classes.item.Item');
* You can load classes in deeper packages than the old ones, simply by passing more levels (api.authentication.ldap.LDAPAuthenticator).

void import (string $name)
  • string $name: name the name of the package to be imported
isSystemParameter (line 181)

Returns if the given String is a Parameter that is already used by the System.

If returning true DO NOT use this Key as URL Parameter!

  • return: if key can be used or not
boolean isSystemParameter (String $key)
  • String $key: a key that should be used as URL Param
loadClass (line 194)

Loads a BIGACE Core Class dynamically.

This simulates a dynamic class loader and saves you from the requirement to know about the directory structure or File naming.

void loadClass (String $subpackage, String $classname)
  • String $subpackage: the subpackage where the class is located
  • String $classname: the class to load
loadLanguageFile (line 47)

Loads a Language File. The Translations (or simply keys) will be accessible through

.

This trys to load the Language File in the current Session Language Locale. If you want to specofy which Locale will be loaded, pass the short locale as second parameter ('en', 'de', ...): (Example: load "system.lang.php" by calling loadLanguageFile('system')

void loadLanguageFile (String $filename, [ $locale = _ULC_], [ $directory = ''])
  • String $filename: the Language Filename (before extension '.lang.php').
  • $locale
  • $directory

Documentation generated by phpDocumentor 1.3.1