blueshoes php application framework and cms            packageless
[ class tree: packageless ] [ index: packageless ] [ all elements ]

Procedural File: Bs_ToDo.lib.php

Source Location: /core/lang/Bs_ToDo.lib.php



Classes:



Page Details:



Includes:

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]





BS_TODO [line 26]

BS_TODO = 'bs_todo'
************************************************************************************************************** This is not a CLASS !!! - It's a library (= collection of functions)

PLEASE name new ones like bs_functionName(), starting with "bs_". thank you.

List of content:

  • bs_requestToDo() # 'ToDo'-Philosophy: Get the toDo-hash that is extracted from the super global $_REQUEST
  • bs_getEmtyToDoHash() # 'ToDo'-Philosophy: Get empty toDo-hash.
Other 'ToDo'-Philosophy sources: Bs_FormUtil.lib.js function bsFormDoHiddenSubmit(exitScreen, exitAction, nextScreen, nextAction, dataHash, submitToAction)

dependencies: Bs_HtmlUtil, Bs_Url




Tags:

version:  4.3.$Revision: 1.2 $ $Date: 2003/10/29 17:48:41 $
author:  andrej arn <at blueshoes dot org>, Sam Blum <sam at blueshoes dot org>

[ Top ]



BS_TODO_DATAHASH [line 31]

BS_TODO_DATAHASH = 'dataHash'

[ Top ]



BS_TODO_EXIT_ACTION [line 28]

BS_TODO_EXIT_ACTION = 'exitAction'

[ Top ]



BS_TODO_EXIT_SCREEN [line 27]

BS_TODO_EXIT_SCREEN = 'exitScreen'

[ Top ]



BS_TODO_NEXT_ACTION [line 30]

BS_TODO_NEXT_ACTION = 'nextAction'

[ Top ]



BS_TODO_NEXT_SCREEN [line 29]

BS_TODO_NEXT_SCREEN = 'nextScreen'

[ Top ]




bs_getEmtyToDoHash [line 166]

void bs_getEmtyToDoHash( )



[ Top ]



bs_makeHiddenToDoFields [line 122]

void bs_makeHiddenToDoFields( [mixed $exitScreen = ''], [mixed $exitActions = array()], [mixed $nextScreen = ''], [mixed $nextActions = array()], [mixed $dataHash = ''])

******************************************************************************************** Make the hidden fields that describe the ToDo-Block so that we can place the result in a html-form.



Tags:



[ Top ]



bs_makeTodoQueryString [line 144]

void bs_makeTodoQueryString( [mixed $exitScreen = ''], [mixed $exitActions = array()], [mixed $nextScreen = ''], [mixed $nextActions = array()], [mixed $dataHash = ''])



Tags:



[ Top ]



bs_remakeTodoQueryStringFromToDo [line 158]

void bs_remakeTodoQueryStringFromToDo( mixed $hash)



Tags:



[ Top ]



bs_requestToDo [line 79]

void &bs_requestToDo( )

********************************************************************************************

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




[ Top ]



bs_requestToDo_convertHelper [line 103]

void bs_requestToDo_convertHelper( mixed $val)



[ Top ]



Documentation generated on Mon, 29 Dec 2003 21:13:12 +0100 by phpDocumentor 1.2.3