require_once($_SERVER['DOCUMENT_ROOT'].$GLOBALS['APP']['path']['diffFromDocRootToGlobalConf'].'global.conf.php') [line 3]
require_once($GLOBALS['APP']['path']['core'].'html/Bs_HtmlUtil.class.php') [line 4]
require_once($GLOBALS['APP']['path']['core'].'net/Bs_Url.class.php') [line 5]
********************************************************************************************
Get the toDo-hash that is extracted from the super global $_REQUEST Use Of This Function: When designing pages that interact with the user (UI-pages), we need some standard structure to pass the information back to the server and making it available to the running PHP functions in a GLOBAL way. When following the 'ToDo'-Philosophy of BlueShoes you should be able to get the 'ToDo'-hash from anywhere in your code and you don't have to setup your own sturcture and peal the data out of PHP's global $_REQUEST. We intend support the 'ToDo'-Philosophy throughout BlueShoes.
ToDo Structure: $bsToDoDefault = array ( BS_TODO_EXIT_SCREEN => '', // (string, optional) The name of the page the request is comming from. BS_TODO_EXIT_ACTION => array(), // (hash of 'action-key'=>TRUE, optional) see below (1*) BS_TODO_NEXT_SCREEN => '', // (string) The name of the page the request is comming from. BS_TODO_NEXT_ACTION => array(), // (hash of 'action-key'=>TRUE, optional) see below (1*) BS_TODO_DATAHASH => '', // (mixed) Usually a cascaded hash of arbitrary data );
Sample (very simple): We got 2 pages Start-page (called START) amd Welcome-page (called WELCOME). Assume the Start-page had a checkbox called 'Skip Flash Intro' and 2 lang buttons 'English' and 'German'. START-PAGE [x]Skip Flash Intro [[English]] [[German]] Pressing 'English' could result in following 'toDo'-hash: array ( BS_TODO_EXIT_SCREEN => 'START', BS_TODO_EXIT_ACTION => NULL, // NULL OR array of actions in the form array('store'=>TRUE, 'show'=>TRUE) BS_TODO_NEXT_SCREEN => 'WELCOME', BS_TODO_NEXT_ACTION => array('skipFlashIntro'=>TRUE)', BS_TODO_DATAHASH => array('language'=>'en') );
(1*) ACTION is an array of action key words of format 'action-key'=>TRUE. This is practical because the PHP-code is $toDo = bs_requestToDo(); if (@$toDo[BS_TODO_NEXT_ACTION]['skipFlashIntro']) { ... } // @ is used to suppress PHP Note see PHP-doc