dev.obliquid.com: obliquid
[ class tree: obliquid ] [ index: obliquid ] [ all elements ]

Class: obliquidweb

Source Location: Program_Root/classes/obliquid/obliquidweb.php

Class Overview


Obliquid class parsing the XML configuration.


Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 29]
Obliquid class parsing the XML configuration.





[ Top ]


Class Variables

$configparms =

[line 42]

array of all the config parameters.

For example, the configuration parameter sitetitle can be retrieved in this way $_obweb->configparms["sitetitle"]




Tags:

var:  xx array of all the config parameters.

Type:   array


[ Top ]

$frame =

[line 58]

frame attribute of tag page




Type:   mixed


[ Top ]

$language = array()

[line 75]

language: numerical indexed array of associative arrays

with keys name, value, flag, date_short, date_long





Type:   mixed


[ Top ]

$locale =

[line 98]

an instance of locale class for multilingual messages




Type:   mixed


[ Top ]

$mb =

[line 81]

a metabase connection




Type:   mixed


[ Top ]

$page =

[line 55]

name of the requested page




Type:   mixed


[ Top ]

$rnd =

[line 52]

a random numerical value to avoid caching




Type:   mixed


[ Top ]

$showslot = true

[line 49]

inside slot code you can set this variable to false and hide the

current slot





Type:   mixed


[ Top ]

$slot = array()

[line 68]

list of slots of a page.

It's an index array. Slot 0 is the first slot found in XML. Each element of this array is an associative array with the following keys: NAME, NAME_TPL, NAME_PHP, TPL, PHP, POSITION, BLOCK, FUNCTION





Type:   mixed


[ Top ]

$slotno =

[line 71]

current slot number 0..count($slot)-1




Type:   mixed


[ Top ]

$slotparam = array()

[line 78]

slot parameters: $param[$slot][$field]




Type:   mixed


[ Top ]

$smslot =

[line 84]

smarty frame, smarty block, smarty slot




Type:   mixed


[ Top ]

$theme =

[line 45]



Tags:

var:  current theme path ex. common/theme/obliquid

Type:   string


[ Top ]

$tpl =

[line 61]

frame smarty template common / local




Type:   mixed


[ Top ]

$tprefix =

[line 32]



Tags:

var:  table prefix (default: "sl_")

Type:   string


[ Top ]

$tsuffix =

[line 35]



Tags:

var:  table suffix for configparms table (default: "")

Type:   string


[ Top ]



Class Methods


constructor obliquidweb [line 102]

void obliquidweb( )

constructor: moved the xml parse to init so we can check authority as we load





[ Top ]

method addButtons [line 359]

void addButtons( $type $type)

adds the requested buttons. Now only supports "help"





Parameters:

$type   $type   - array of requested buttons

[ Top ]

method addErr [line 325]

void addErr( $err_msg $err_msg, [$type $type = "USER_ERROR"])

USER messages gets added and displayed in a javascript popup, DEV messages gets emailed to "site_err" configparms email, if present.

The messages are escaped with addslashes().






Parameters:

$err_msg   $err_msg   message to be shown
$type   $type   one of USER_NOTICE, USER_ERROR, DEV_NOTICE, DEV_ERROR

[ Top ]

method changeLang [line 214]

void changeLang( mixed $lang)

Changes the current language/locale.

Use $lang = "*dflt" to restore automatic language selection according to browser. This function requires $_obweb->getLanguages() to be called first in order to work.






[ Top ]

method confirm [line 352]

void confirm( $confirm_msg $confirm_msg)

Javascript confirm question.

The message is escaped with addslashes()






Parameters:

$confirm_msg   $confirm_msg   message to be shown

[ Top ]

method createSlot [line 238]

void createSlot( )

creates a block and a slot smarty templates.

Sets $this->smslot and $this->smblock






[ Top ]

method getLanguages [line 195]

void getLanguages( )

Fetches the list of available languages





[ Top ]

method getNamePhp [line 304]

void getNamePhp( mixed $slotno)

Gets the php name of $slotno





[ Top ]

method getNameTpl [line 294]

void getNameTpl( mixed $slotno)

Gets the template name of $slotno





[ Top ]

method getPhpFunction [line 314]

void getPhpFunction( mixed $slotno)

Gets the php function name of $slotno





[ Top ]

method has [line 410]

void has( $a $a, [$b $b = ""], [$c $c = ""])

Checks whether the current user has access to the security object

the format of the security object is a:b:c loads and sets $_SESSION["_obsecurity"] if necessary

  Examples:
  Slot security: $_obweb->has(slotname);
  Navigation security: $_obweb->has("", pagename);
  Operation: $_obweb->has(id_module, operationname)
  Table/key: $_obweb->has(tablename, id)
  Function:  $_obweb->has(slotname, functionname);
  Notice that the third parameter is never used, since it's for future developments
  






Parameters:

$a   $a   - part 'a' of the security object
$b   $b   - part 'b' of the security object (optional)
$c   $c   - part 'c' of the security object (optional)

[ Top ]

method init [line 110]

void init( $page $page)

opens a connection to the database, creates a smarty templates

for the frame, sets UTF-8 charset, sets default theme if not set reads xml global tags and page specific tags






Parameters:

$page   $page   the page to be shown

[ Top ]

method resethas [line 424]

void resethas( )

Force a reload of the security table for this user





[ Top ]


Documentation generated on Tue, 29 Mar 2005 09:04:35 -0800 by phpDocumentor 1.2.0rc2