bigace.library
[ class tree: bigace.library ] [ index: bigace.library ] [ all elements ]

Procedural File: functions.inc.php

Source Location: /libs/functions.inc.php



Classes:



Page Details:

BIGACE - a PHP and MySQL based Web CMS.

Copyright (C) 2003-2005 Kevin Papst.

BIGACE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

BIGACE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

For further information visit www.kevinpapst.de.




Tags:

author:  Kevin Papst <bigace@kevinpapst.de>
version:  $Id: functions.inc.php,v 1.13 2005/10/01 18:29:41 Kevin Exp $








createCommandLink [line 169]

String createCommandLink( String $cmd, String $id, [array $params = array()], [String $name = ''], [String $address = ''])

Creates a BIGACE Command Link.



Tags:

return:  the formatted Link


Parameters

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



createLink [line 133]

String createLink( array $params, [String $adress = ''])

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.




Tags:

return:  the created Link


Parameters

array   $params   the Parameter as key-value mapping
String   $adress   the link address, if non is given the _BIGACE['HOME'] address will be linked
[ Top ]



createMenuLink [line 119]

String createMenuLink( [int $mid = ''], [array $params = array()], [mixed $name = ''])

Creates a Link to the given Menu Id.

Uses the function

  1. createLink($params)
.




Tags:

return:  the MenuLink


Parameters

int   $mid   the Menu ID
array   $params   key - value pairs to append to the link (leave for none)
[ Top ]



extractVar [line 95]

String extractVar( String $varname, [String $notfound = ''])

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.




Tags:

return:  the varname or notfound if none was given


Parameters

String   $varname   the varname to lookup
String   $notfound   the varname to return is none was found
[ Top ]



getRandomString [line 181]

String getRandomString( )

Returns a random String.



Tags:

return:  the Random String


[ Top ]



getTranslation [line 77]

String getTranslation( String $name, [String $common = ''])

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



Tags:

return:  the translation


Parameters

String   $name   the translation key
String   $common   a String being returned if no translation could be found
[ Top ]



isSystemParameter [line 194]

boolean isSystemParameter( String $key)

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

If returning true you should NOT work with this String!




Tags:

return:  if key can be used or not


Parameters

String   $key   a key that should be used as URL Param
[ Top ]



loadClass [line 206]

void loadClass( String $package, String $classname)

This simulates a dynamic class loader.

We do not have to know about the directory structure or File naming at all!




Parameters

String   $package   the package were the class can be found
String   $classname   the class to load
[ Top ]



loadLanguageFile [line 42]

void loadLanguageFile( String $filename, [mixed $locale = _ULC_], [mixed $directory = ''])

Appends an Language File to the Global Scope, the keys will get accessible by using getTranslation('foo').

To load User dependend translation call "loadLanguageFile('system')". To load a specific language pass the short locale as second parameter ('en', 'de', ...).




Parameters

String   $filename   the Language Filename part before the _ (example: load "system_en.inc.php" by calling loadLanguageFile('system')
[ Top ]



Documentation generated on Tue, 11 Oct 2005 23:02:03 +0200 by phpDocumentor 1.3.0RC2