Class: I2CE (Development): Difference between revisions

From IHRIS Wiki
(Created page with '{{otherversions|Class: I2CE}} This article describes the class ''I2CE'' . *Location: Part of the module I2CE in the package [https://launc…')
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
This article describes the class ''I2CE'' .
This article describes the class ''I2CE'' .
*Location: Part of the module [[I2CE Module List (Development)#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE] 4.0-dev
*Location: Part of the module [[I2CE Module List (Development)#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE] 4.0-dev
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L44 lib/I2CE.php] on line 44
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L45 lib/I2CE.php] on line 45
This class mainly handles throwing errors from withing I2CE
==Variables==
==Variables==
===$email===
string $email
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L50 i2ce/lib/I2CE.php] on line 50
*Type: static public public $email
===$userAccess===
===$userAccess===
I2CE_UserAccess_Mechanism $userAccess the user access mechanism
I2CE_UserAccess_Mechanism $userAccess the user access mechanism
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L51 i2ce/lib/I2CE.php] on line 51
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L54 i2ce/lib/I2CE.php] on line 54
*Type: static protected protected $userAccess
*Type: static protected protected $userAccess
===$fileSearch===
I2CE_FileSearch $fileSearch
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L60 i2ce/lib/I2CE.php] on line 60
*Type: static protected static $fileSearch


===$userAccessProtocol===
===$userAccessProtocol===
string $userAccessProtocol the user access class
string $userAccessProtocol the user access class
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L57 i2ce/lib/I2CE.php] on line 57
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L65 i2ce/lib/I2CE.php] on line 65
*Type: static protected protected $userAccessProtocol
*Type: static protected protected $userAccessProtocol


===$userAccessInit===
===$userAccessInit===
array $userAccessInit os string the user access initialization strings
array $userAccessInit os string the user access initialization strings
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L62 i2ce/lib/I2CE.php] on line 62
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L70 i2ce/lib/I2CE.php] on line 70
*Type: static protected protected $userAccessInit
*Type: static protected protected $userAccessInit


===$site_initialized===
===$site_initialized===
True if the site  has been initalized. @param static protected boolean $site_initalized
True if the site  has been initalized. @param static protected boolean $site_initalized
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L160 i2ce/lib/I2CE.php] on line 160
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L168 i2ce/lib/I2CE.php] on line 168
*Type: static protected $site_initialized
*Type: static protected $site_initialized
===$ob_level===
The ooutput buffer level after initializion
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L622 i2ce/lib/I2CE.php] on line 622
*Type: static public  $ob_level


===$updateStart===
===$updateStart===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L665 i2ce/lib/I2CE.php] on line 665
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L684 i2ce/lib/I2CE.php] on line 684
*Type: protected $updateStart
*Type: protected $updateStart


===$storage===
===$storage===
I2CE_MagicData
I2CE_MagicData
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L811 i2ce/lib/I2CE.php] on line 811
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L829 i2ce/lib/I2CE.php] on line 829
*Type: static protected static $storage
*Type: static protected static $storage
===$stored_messages===
An array of the notice/warning messages received for this session array $stored_messages
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L821 i2ce/lib/I2CE.php] on line 821
*Type: static protected static $stored_messages
===$errorType===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L824 i2ce/lib/I2CE.php] on line 824
*Type: static public $errorType
===$noticeErrors===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L840 i2ce/lib/I2CE.php] on line 840
*Type: static public $noticeErrors
===$warningErrors===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L841 i2ce/lib/I2CE.php] on line 841
*Type: static public $warningErrors
===$ignoreErrorsFromFilesMatching===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L844 i2ce/lib/I2CE.php] on line 844
*Type: static public $ignoreErrorsFromFilesMatching
===$ignoreErrors===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L845 i2ce/lib/I2CE.php] on line 845
*Type: static public $ignoreErrors
===$supress===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L855 i2ce/lib/I2CE.php] on line 855
*Type: protected $supress
===$site_warnings===
Count of the number of erros and warings received when the site is not initialized @param static protected boolean $site_warnings
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L885 i2ce/lib/I2CE.php] on line 885
*Type: static protected $site_warnings
===$error_num===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L895 i2ce/lib/I2CE.php] on line 895
*Type: protected $error_num
===$errorHandler===
Optional error handler callback.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L900 i2ce/lib/I2CE.php] on line 900
*Type: static private $errorHandler
===$started_errors===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L918 i2ce/lib/I2CE.php] on line 918
*Type: protected $started_errors
===$errorImage===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L919 i2ce/lib/I2CE.php] on line 919
*Type: protected $errorImage
===$errorStart===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L1236 i2ce/lib/I2CE.php] on line 1236
*Type: protected $errorStart
===$badness===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L1381 i2ce/lib/I2CE.php] on line 1381
*Type: protected $badness
===$email===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L1418 i2ce/lib/I2CE.php] on line 1418
*Type: static protected $email
===$fileSearch===
I2CE_FileSearch $fileSearch
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L1574 i2ce/lib/I2CE.php] on line 1574
*Type: static protected static $fileSearch
===$trace_depth===
integer $trace_depth.  Defaults to 1.    The number of previous methods to report when an error message is developed. Set to a negative number to report all, or 0 to report none.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L1581 i2ce/lib/I2CE.php] on line 1581
*Type: static protected static $trace_depth


==Methods==
==Methods==
===allSystemsAreGoGo()===
===allSystemsAreGoGo()===
Get the system status.  http://www.ursula1000.com/
Get the system status.  http://www.ursula1000.com/
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L684 i2ce/lib/I2CE.php] on line 684
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L703 i2ce/lib/I2CE.php] on line 703
*Signature: static public function allSystemsAreGoGo($site_module_file,$check_time)
*Signature: static public function allSystemsAreGoGo($site_module_file,$check_time)
*Parameters:
*Parameters:
Line 118: Line 59:
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>'gogo' means we are good. 'needs_installation'  means we need to initialize. 'needs_upgrade'
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>'gogo' means we are good. 'needs_installation'  means we need to initialize. 'needs_upgrade'
===bringUpSystem()===
===bringUpSystem()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L606 i2ce/lib/I2CE.php] on line 606
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L625 i2ce/lib/I2CE.php] on line 625
*Signature: static protected function bringUpSystem($site_module_file)
*Signature: static protected function bringUpSystem($site_module_file)
*Parameters:
*Parameters:
Line 124: Line 65:
===dbConnect()===
===dbConnect()===
connect to the database
connect to the database
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L187 i2ce/lib/I2CE.php] on line 187
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L195 i2ce/lib/I2CE.php] on line 195
*Signature: static protected function dbConnect($dsn)
*Signature: static protected function dbConnect($dsn)
*Parameters:
*Parameters:
Line 131: Line 72:
===getAccessedBaseURL()===
===getAccessedBaseURL()===
Returns the base url from which the site was accessed.  If no .htaccess is used, ths will include the index.php.  If rewrites are used (via .htacces) this will no include the index.php. Point is... this is the base url from which the site was accessed, no questions asked.  This of course assumes that you are now accessing the site via the command line
Returns the base url from which the site was accessed.  If no .htaccess is used, ths will include the index.php.  If rewrites are used (via .htacces) this will no include the index.php. Point is... this is the base url from which the site was accessed, no questions asked.  This of course assumes that you are now accessing the site via the command line
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L427 i2ce/lib/I2CE.php] on line 427
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L438 i2ce/lib/I2CE.php] on line 438
*Signature: static public function getAccessedBaseURL($include_http)
*Signature: static public function getAccessedBaseURL($include_http)
*Parameters:
*Parameters:
Line 139: Line 80:
===getConfig()===
===getConfig()===
Get the configuration storage @param string $instance.  Defaults to 'default'
Get the configuration storage @param string $instance.  Defaults to 'default'
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L785 i2ce/lib/I2CE.php] on line 785
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L803 i2ce/lib/I2CE.php] on line 803
*Signature: static public function getConfig()
*Signature: static public function getConfig()
*Returns: [[Class: I2CE_MagicData (Development) | I2CE_MagicData]]
*Returns: [[Class: I2CE_MagicData (Development) | I2CE_MagicData]]
===getFileSearch()===
===getFileSearch()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L802 i2ce/lib/I2CE.php] on line 802
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L820 i2ce/lib/I2CE.php] on line 820
*Signature: static public function getFileSearch()
*Signature: static public function getFileSearch()
===getPrevMethod()===
Parse the debug backtrace to get the method that raised the error.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L1603 i2ce/lib/I2CE.php] on line 1603
*Signature: static protected function getPrevMethod($debug,$start_depth,$trace_depth)
*Parameters:
** [http://www.php.net/manual/en/language.types.array.php array ] $debug
**$start_depth
***Default Value: 1
**$trace_depth
***Default Value: 1
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===getRuntimeVariable()===
===getRuntimeVariable()===
Gets a runtime variable.  For the CLI is the is from the environment which may be overwridden by a ---long-option from the command line.  Otherwise it is set by SetEnv in a .htaccess file (which is stored in $_SERVER)
Gets a runtime variable.  For the CLI is the is from the environment which may be overwridden by a ---long-option from the command line.  Otherwise it is set by SetEnv in a .htaccess file (which is stored in $_SERVER)
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L359 i2ce/lib/I2CE.php] on line 359
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L370 i2ce/lib/I2CE.php] on line 370
*Signature: static public function getRuntimeVariable($var,$val)
*Signature: static public function getRuntimeVariable($var,$val)
*Parameters:
*Parameters:
Line 166: Line 96:
===getUserAccess()===
===getUserAccess()===
Get the user access mechanism
Get the user access mechanism
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L133 i2ce/lib/I2CE.php] on line 133
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L141 i2ce/lib/I2CE.php] on line 141
*Signature: static public function getUserAccess()
*Signature: static public function getUserAccess()
*Returns: I2CE_UserAccess_Mechansim
*Returns: I2CE_UserAccess_Mechansim
===getUserAccessInit()===
===getUserAccessInit()===
Set the user access mechanism initialization string
Set the user access mechanism initialization string
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L104 i2ce/lib/I2CE.php] on line 104
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L112 i2ce/lib/I2CE.php] on line 112
*Signature: static public function getUserAccessInit($protocol)
*Signature: static public function getUserAccessInit($protocol)
*Parameters:
*Parameters:
Line 179: Line 109:
===getUserAccessProtocol()===
===getUserAccessProtocol()===
Gets the registered user access protocol
Gets the registered user access protocol
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L67 i2ce/lib/I2CE.php] on line 67
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L75 i2ce/lib/I2CE.php] on line 75
*Signature: static public function getUserAccessProtocol()
*Signature: static public function getUserAccessProtocol()
===handleError()===
===handleError()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L858 i2ce/lib/I2CE.php] on line 858
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L847 i2ce/lib/I2CE.php] on line 847
*Signature: public function handleError($err_no,$err_string,$err_file,$err_line,$err_context)
*Signature: public function handleError($err_no,$err_string,$err_file,$err_line,$err_context)
*Parameters:
*Parameters:
Line 195: Line 125:
===hasWarnings()===
===hasWarnings()===
See if there were any warning messages set before the site was initialized
See if there were any warning messages set before the site was initialized
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L891 i2ce/lib/I2CE.php] on line 891
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L873 i2ce/lib/I2CE.php] on line 873
*Signature: static public function hasWarnings()
*Signature: static public function hasWarnings()
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
===initialize()===
===initialize()===
Gets the core system going. @deprecated since version 4.0.3
Gets the core system going. @deprecated since version 4.0.3
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L455 i2ce/lib/I2CE.php] on line 455
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L466 i2ce/lib/I2CE.php] on line 466
*Signature: static public function initialize($db_user,$db_pass,$db_name,$user_access_init,$site_module_file,$bring_up_system)
*Signature: static public function initialize($db_user,$db_pass,$db_name,$user_access_init,$site_module_file,$bring_up_system)
*Parameters:
*Parameters:
Line 213: Line 143:
===initializeDSN()===
===initializeDSN()===
Gets the core system going.
Gets the core system going.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L511 i2ce/lib/I2CE.php] on line 511
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L522 i2ce/lib/I2CE.php] on line 522
*Signature: static public function initializeDSN($dsn,$user_access_init,$site_module_file,$bring_up_system)
*Signature: static public function initializeDSN($dsn,$user_access_init,$site_module_file,$bring_up_system)
*Parameters:
*Parameters:
Line 223: Line 153:
*Returns: boolean.<br/>True on sucess
*Returns: boolean.<br/>True on sucess
===longExecution()===
===longExecution()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L752 i2ce/lib/I2CE.php] on line 752
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L770 i2ce/lib/I2CE.php] on line 770
*Signature: static public function longExecution($limits,$notice)
*Signature: static public function longExecution($limits,$notice)
*Parameters:
*Parameters:
Line 229: Line 159:
***Default Value: null
***Default Value: null
**$notice  
**$notice  
***Default Value: true
***Default Value: false
===pearError()===
===pearError()===
Check to see if a object is a pear error and raise an error if it is.
Check to see if a object is a pear error and raise an error if it is.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L1649 i2ce/lib/I2CE.php] on line 1649
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L860 i2ce/lib/I2CE.php] on line 860
*Signature: static public function pearError($obj,$message,$type,$redirect)
*Signature: static public function pearError($obj,$message,$type,$redirect)
*Parameters:
*Parameters:
Line 241: Line 171:
** [http://www.php.net/manual/en/language.types.string.php string ] $redirect <br/>The page to redirect to if this is a critical error.
** [http://www.php.net/manual/en/language.types.string.php string ] $redirect <br/>The page to redirect to if this is a critical error.
***Default Value: ""  
***Default Value: ""  
===popErrorHandler()===
Pop an error handler off of the stack.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L914 i2ce/lib/I2CE.php] on line 914
*Signature: static public function popErrorHandler()
*Returns: $callback<br/>the callback popped off the stack
===pushErrorHandler()===
Push an error handler onto the stack. @param $callback
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L906 i2ce/lib/I2CE.php] on line 906
*Signature: static public function pushErrorHandler($callback)
*Parameters:
**$callback
===raiseError()===
===raiseError()===
Raise an error and redirect the user for any critical errors. The default redirect will go to the home page for the site. @param string/mixed $message The error message.
Raise an error and redirect the user for any critical errors. The default redirect will go to the home page for the site. @param string/mixed $message The error message.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L1429 i2ce/lib/I2CE.php] on line 1429
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L842 i2ce/lib/I2CE.php] on line 842
*Signature: static public function raiseError($message,$type,$redirect)
*Signature: static public function raiseError($message,$type,$redirect)
*Parameters:
*Parameters:
Line 264: Line 183:
***Default Value: ""  
***Default Value: ""  
===resetFileSearch()===
===resetFileSearch()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L344 i2ce/lib/I2CE.php] on line 344
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L355 i2ce/lib/I2CE.php] on line 355
*Signature: public function resetFileSearch()
*Signature: public function resetFileSearch()
===rewrittenURLs()===
===rewrittenURLs()===
returns true if the url's have been written. false if not
returns true if the url's have been written. false if not
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L407 i2ce/lib/I2CE.php] on line 407
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L418 i2ce/lib/I2CE.php] on line 418
*Signature: static public function rewrittenURLs()
*Signature: static public function rewrittenURLs()
===setConfig()===
===setConfig()===
Sets an instance magic data object @param I2CE_MagicData $magicdata
Sets an instance magic data object @param I2CE_MagicData $magicdata
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L794 i2ce/lib/I2CE.php] on line 794
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L812 i2ce/lib/I2CE.php] on line 812
*Signature: static public function setConfig($magicData)
*Signature: static public function setConfig($magicData)
*Parameters:
*Parameters:
**$magicData  
**$magicData  
===setTraceDepth()===
Set the trace depth used in reporting error messages
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L1592 i2ce/lib/I2CE.php] on line 1592
*Signature: static public function setTraceDepth($depth)
*Parameters:
** integer $depth Set to a negative number to report all, 0 to report none.
*Returns: integer.<br/>The previous value of trace depth.
===setUserAccess()===
===setUserAccess()===
Set the user access mechanism
Set the user access mechanism
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L121 i2ce/lib/I2CE.php] on line 121
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L129 i2ce/lib/I2CE.php] on line 129
*Signature: static public function setUserAccess($userAccess)
*Signature: static public function setUserAccess($userAccess)
*Parameters:
*Parameters:
Line 291: Line 203:
===setUserAccessInit()===
===setUserAccessInit()===
Set the user access mechanism initialization string
Set the user access mechanism initialization string
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L77 i2ce/lib/I2CE.php] on line 77
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L85 i2ce/lib/I2CE.php] on line 85
*Signature: static public function setUserAccessInit($userAccessInit,$protocol,$set_protocol)
*Signature: static public function setUserAccessInit($userAccessInit,$protocol,$set_protocol)
*Parameters:
*Parameters:
Line 301: Line 213:
===setupDatabaseReferences()===
===setupDatabaseReferences()===
Setup the references to database names in magic data
Setup the references to database names in magic data
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L389 i2ce/lib/I2CE.php] on line 389
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L400 i2ce/lib/I2CE.php] on line 400
*Signature: static protected function setupDatabaseReferences($user_db)
*Signature: static protected function setupDatabaseReferences($user_db)
*Parameters:
*Parameters:
Line 308: Line 220:
===setupFileSearch()===
===setupFileSearch()===
Create and populate the file search
Create and populate the file search
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L317 i2ce/lib/I2CE.php] on line 317
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L328 i2ce/lib/I2CE.php] on line 328
*Signature: static public function setupFileSearch($paths,$clear_cache)
*Signature: static public function setupFileSearch($paths,$clear_cache)
*Parameters:
*Parameters:
Line 317: Line 229:
===setupMagicData()===
===setupMagicData()===
Creates  the magic data instance. Sets the mafic data storage mechanisms to be used.
Creates  the magic data instance. Sets the mafic data storage mechanisms to be used.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L267 i2ce/lib/I2CE.php] on line 267
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L283 i2ce/lib/I2CE.php] on line 283
*Signature: static protected function setupMagicData()
*Signature: static public function setupMagicData($set_config,$replace)
*Parameters:
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $set_config <br/>Defaults to false meaning we dont replace the magic data instance
***Default Value: true
**$replace
***Default Value: false
*Returns: [[Class: I2CE_MagicData (Development) | I2CE_MagicData]]<br/>on success, null on failure
===setupSession()===
===setupSession()===
Setup the session variables
Setup the session variables
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L220 i2ce/lib/I2CE.php] on line 220
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L228 i2ce/lib/I2CE.php] on line 228
*Signature: static protected function setupSession()
*Signature: static protected function setupSession()
===siteInitialized()===
===siteInitialized()===
Get/Set the site's initialization state. @param init.  Defaults to null in which case we return the site installation state.  if non-null, it is the new site initialization state.
Get/Set the site's initialization state. @param init.  Defaults to null in which case we return the site installation state.  if non-null, it is the new site initialization state.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L172 i2ce/lib/I2CE.php] on line 172
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/lib/I2CE.php#L180 i2ce/lib/I2CE.php] on line 180
*Signature: static public function siteInitialized($init)
*Signature: static public function siteInitialized($init)
*Parameters:
*Parameters:

Latest revision as of 07:55, 3 August 2010


This article describes the class I2CE .

  • Location: Part of the module I2CE in the package I2CE 4.0-dev
  • Source: Defined in the file lib/I2CE.php on line 45

Variables

$email

string $email

$userAccess

I2CE_UserAccess_Mechanism $userAccess the user access mechanism

$fileSearch

I2CE_FileSearch $fileSearch

$userAccessProtocol

string $userAccessProtocol the user access class

  • Defined in i2ce/lib/I2CE.php on line 65
  • Type: static protected protected $userAccessProtocol

$userAccessInit

array $userAccessInit os string the user access initialization strings

  • Defined in i2ce/lib/I2CE.php on line 70
  • Type: static protected protected $userAccessInit

$site_initialized

True if the site has been initalized. @param static protected boolean $site_initalized

$ob_level

The ooutput buffer level after initializion

$updateStart

$storage

I2CE_MagicData

Methods

allSystemsAreGoGo()

Get the system status. http://www.ursula1000.com/

  • Defined in i2ce/lib/I2CE.php on line 703
  • Signature: static public function allSystemsAreGoGo($site_module_file,$check_time)
  • Parameters:
    • $site_module_file
    • $check_time
      • Default Value: false
  • Returns: string
    'gogo' means we are good. 'needs_installation' means we need to initialize. 'needs_upgrade'

bringUpSystem()

  • Defined in i2ce/lib/I2CE.php on line 625
  • Signature: static protected function bringUpSystem($site_module_file)
  • Parameters:
    • $site_module_file

dbConnect()

connect to the database

  • Defined in i2ce/lib/I2CE.php on line 195
  • Signature: static protected function dbConnect($dsn)
  • Parameters:
  • Returns: true
    on sucess

getAccessedBaseURL()

Returns the base url from which the site was accessed. If no .htaccess is used, ths will include the index.php. If rewrites are used (via .htacces) this will no include the index.php. Point is... this is the base url from which the site was accessed, no questions asked. This of course assumes that you are now accessing the site via the command line

  • Defined in i2ce/lib/I2CE.php on line 438
  • Signature: static public function getAccessedBaseURL($include_http)
  • Parameters:
    • $include_http
      • Default Value: true
  • Returns: string

getConfig()

Get the configuration storage @param string $instance. Defaults to 'default'

getFileSearch()

  • Defined in i2ce/lib/I2CE.php on line 820
  • Signature: static public function getFileSearch()

getRuntimeVariable()

Gets a runtime variable. For the CLI is the is from the environment which may be overwridden by a ---long-option from the command line. Otherwise it is set by SetEnv in a .htaccess file (which is stored in $_SERVER)

  • Defined in i2ce/lib/I2CE.php on line 370
  • Signature: static public function getRuntimeVariable($var,$val)
  • Parameters:
    • string $var
      the variable name
    • string $val
      the defualt value; Defaults to the zero length string
      • Default Value:

getUserAccess()

Get the user access mechanism

  • Defined in i2ce/lib/I2CE.php on line 141
  • Signature: static public function getUserAccess()
  • Returns: I2CE_UserAccess_Mechansim

getUserAccessInit()

Set the user access mechanism initialization string

  • Defined in i2ce/lib/I2CE.php on line 112
  • Signature: static public function getUserAccessInit($protocol)
  • Parameters:
    • string $protocol
      If null, the default, then we get the init string for the currently registered protocol.
      • Default Value: null
  • Returns: string

getUserAccessProtocol()

Gets the registered user access protocol

  • Defined in i2ce/lib/I2CE.php on line 75
  • Signature: static public function getUserAccessProtocol()

handleError()

  • Defined in i2ce/lib/I2CE.php on line 847
  • Signature: public function handleError($err_no,$err_string,$err_file,$err_line,$err_context)
  • Parameters:
    • $err_no
    • $err_string
    • $err_file
      • Default Value: false
    • $err_line
      • Default Value: false
    • $err_context
      • Default Value: false

hasWarnings()

See if there were any warning messages set before the site was initialized

initialize()

Gets the core system going. @deprecated since version 4.0.3

  • Defined in i2ce/lib/I2CE.php on line 466
  • Signature: static public function initialize($db_user,$db_pass,$db_name,$user_access_init,$site_module_file,$bring_up_system)
  • Parameters:
    • string $db_user
      the database user
    • string $db_pass
      the database user's password
    • string $db_name
      the name of the database all data is stored in
    • string $user_access_init
      the init string for the user access mechanism
    • string $site_module_file
      the configttion file for the site module
    • $bring_up_system
      • Default Value: true
  • Returns: boolean.
    True on sucess

initializeDSN()

Gets the core system going.

  • Defined in i2ce/lib/I2CE.php on line 522
  • Signature: static public function initializeDSN($dsn,$user_access_init,$site_module_file,$bring_up_system)
  • Parameters:
    • string $dsn
      dsn string to connect to the database
    • string $user_access_init
      the init string for the user access mechanism
    • string $site_module_file
      the configttion file for the site module
    • $bring_up_system
      • Default Value: true
  • Returns: boolean.
    True on sucess

longExecution()

  • Defined in i2ce/lib/I2CE.php on line 770
  • Signature: static public function longExecution($limits,$notice)
  • Parameters:
    • $limits
      • Default Value: null
    • $notice
      • Default Value: false

pearError()

Check to see if a object is a pear error and raise an error if it is.

  • Defined in i2ce/lib/I2CE.php on line 860
  • Signature: static public function pearError($obj,$message,$type,$redirect)
  • Parameters:
    • mixed $obj
    • string $message
      The error message to display if it is an error.
    • integer $type
      The error type to raise.
      • Default Value: E_USER_NOTICE
    • string $redirect
      The page to redirect to if this is a critical error.
      • Default Value: ""

raiseError()

Raise an error and redirect the user for any critical errors. The default redirect will go to the home page for the site. @param string/mixed $message The error message.

  • Defined in i2ce/lib/I2CE.php on line 842
  • Signature: static public function raiseError($message,$type,$redirect)
  • Parameters:
    • $message
      • Default Value: null
    • integer $type
      The error type.
      • Default Value: E_USER_NOTICE
    • string $redirect
      The page to redirect to for critical errors. @global array
      • Default Value: ""

resetFileSearch()

  • Defined in i2ce/lib/I2CE.php on line 355
  • Signature: public function resetFileSearch()

rewrittenURLs()

returns true if the url's have been written. false if not

  • Defined in i2ce/lib/I2CE.php on line 418
  • Signature: static public function rewrittenURLs()

setConfig()

Sets an instance magic data object @param I2CE_MagicData $magicdata

  • Defined in i2ce/lib/I2CE.php on line 812
  • Signature: static public function setConfig($magicData)
  • Parameters:
    • $magicData

setUserAccess()

Set the user access mechanism

setUserAccessInit()

Set the user access mechanism initialization string

  • Defined in i2ce/lib/I2CE.php on line 85
  • Signature: static public function setUserAccessInit($userAccessInit,$protocol,$set_protocol)
  • Parameters:
    • string $userAccessInit
    • string $protocol
      Defaults to null in which case we parse it from the init string
      • Default Value: null
    • boolean $set_protocol
      Defatuls to false. If true we set the current protocol to be the one we are registering
      • Default Value: false

setupDatabaseReferences()

Setup the references to database names in magic data

  • Defined in i2ce/lib/I2CE.php on line 400
  • Signature: static protected function setupDatabaseReferences($user_db)
  • Parameters:
    • string $user_db
      defaults
      • Default Value: null

setupFileSearch()

Create and populate the file search

  • Defined in i2ce/lib/I2CE.php on line 328
  • Signature: static public function setupFileSearch($paths,$clear_cache)
  • Parameters:
    • array $paths
      An array with keys file search categories and values a path or an array of paths to add to the file search
      • Default Value: array()
    • boolean $clear_cache
      Default to false. If true, we clear out the APC Cache.
      • Default Value: false

setupMagicData()

Creates the magic data instance. Sets the mafic data storage mechanisms to be used.

  • Defined in i2ce/lib/I2CE.php on line 283
  • Signature: static public function setupMagicData($set_config,$replace)
  • Parameters:
    • boolean $set_config
      Defaults to false meaning we dont replace the magic data instance
      • Default Value: true
    • $replace
      • Default Value: false
  • Returns: I2CE_MagicData
    on success, null on failure

setupSession()

Setup the session variables

  • Defined in i2ce/lib/I2CE.php on line 228
  • Signature: static protected function setupSession()

siteInitialized()

Get/Set the site's initialization state. @param init. Defaults to null in which case we return the site installation state. if non-null, it is the new site initialization state.

  • Defined in i2ce/lib/I2CE.php on line 180
  • Signature: static public function siteInitialized($init)
  • Parameters:
    • $init
      • Default Value: null
  • Returns: mixed.