Class: BitSystem
Source Location: /kernel/BitSystem.php
Child classes:
|
Inherited Constants
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Class Methods
static method genPass [line 1301]
static method getSingleInstance [line 99]
static void getSingleInstance(
)
|
|
Tags:
static method loadFromCache [line 143]
static void loadFromCache(
$pCacheKey)
|
|
Tags:
Parameters:
static method prependIncludePath [line 1481]
static void prependIncludePath(
$pPath)
|
|
* Prepend $pPath to the include path \static
Tags:
Parameters:
constructor __construct [line 110]
method appendIncludePath [line 1505]
void appendIncludePath(
$pPath)
|
|
* Append $pPath to the include path \static
Parameters:
method calculateRequirements [line 2099]
boolean calculateRequirements(
[boolean
$pInstallVersion = FALSE])
|
|
calculateRequirements will calculate all requirements and return a hash of the results
Tags:
Parameters:
method checkBitVersion [line 2491]
returns checkBitVersion(
)
|
|
checkBitVersion Check for new version of bitweaver
Tags:
method checkEnvironment [line 1548]
method confirmDialog [line 740]
none confirmDialog(
$pFormHash
$pFormHash, $pMsg
$pMsg)
|
|
This code was duplicated _EVERYWHERE_ so here is an easy template to cut that down.
Tags:
Parameters:
method diff2 [line 2556]
void diff2(
$page1,
$page2)
|
|
Parameters:
method display [line 399]
void display(
$mid
$pMid, [$browserTitle
$pBrowserTitle = NULL], [$format
$pOptionsHash = array()])
|
|
Display the main page template
Tags:
Parameters:
method drawRequirementsGraph [line 2165]
boolean drawRequirementsGraph(
[boolean
$pInstallVersion = FALSE], [string
$pFormat = 'png'], [string
$pCommand = 'dot'])
|
|
drawRequirementsGraph Will draw a requirement graph if PEAR::Image_GraphViz is installed
Tags:
Parameters:
method expungePackageConfig [line 307]
void expungePackageConfig(
$pPackageName)
|
|
Delete all prefences for the given package
Tags:
Parameters:
method fatalError [line 974]
none fatalError(
$pMsg, [string
$pTemplate = NULL], [string
$pErrorTitle = NULL], [
$pHttpStatus = 200], string
$)
|
|
If an unrecoverable error has occurred, this method should be invoked. script exist occurs
Tags:
Parameters:
method fatalPermission [line 702]
none fatalPermission(
$pPermission
$pPermission, [$pMsg
$pMsg = NULL])
|
|
Interupt code execution and show a permission denied message. This does not show a big nasty denied message if user is simply not logged in. This *could* lead to a user seeing a denied message twice, however this is unlikely as logic permission checks should prevent access to non-permed page REQUEST in the first place
Tags:
Parameters:
method getBitVersion [line 2477]
string getBitVersion(
[boolean
$pIncludeLevel = TRUE])
|
|
getBitVersion will fetch the version of bitweaver as set in kernel/config_defaults_inc.php
Tags:
Parameters:
method getBrowserTitle [line 1266]
get the title of the browser
Tags:
method getConfig [line 189]
void getConfig(
$pName, [
$pDefault = NULL])
|
|
Add getConfig / setConfig for more uniform handling of config variables instead of spreading global vars. easily get the value of any given preference stored in kernel_config
Tags:
Parameters:
method getConfigMatch [line 202]
void getConfigMatch(
$pPattern, [
$pSelectValue = ""])
|
|
retreive a group of config variables
Tags:
Parameters:
method getDefaultPage [line 1120]
method getDefaultTempDir [line 1541]
void getDefaultTempDir(
)
|
|
Tags:
method getErrorEmail [line 337]
Smartly determines where error emails should go
Tags:
method getIncludeFiles [line 2578]
array getIncludeFiles(
[array
$pPhpFile = NULL], [array
$pTplFile = NULL])
|
|
getIncludeFiles will get a set of available files with a given filename
Tags:
Parameters:
method getIndexPage [line 1133]
URL getIndexPage(
[
$pIndexType = NULL])
|
|
getIndexPage Returns the page for the given type defaults to the site homepage
Tags:
Parameters:
method getLatestUpgradeVersion [line 1964]
string getLatestUpgradeVersion(
array
$pPackage)
|
|
getLatestUpgradeVersion will fetch the greatest upgrade number for a given package
Tags:
Parameters:
method getMimeExtension [line 1449]
void getMimeExtension(
$pMimeType)
|
|
Parameters:
method getPackageStatus [line 562]
char getPackageStatus(
$pPackageName
$pPackageName)
|
|
find out a packages installation status
Tags:
Parameters:
method getPermissionDeniedMessage [line 720]
void getPermissionDeniedMessage(
$pPermission)
|
|
Parameters:
method getPermissionInfo [line 667]
none getPermissionInfo(
[$pPermission
$pPermission = NULL], [
$pPackageName = NULL])
|
|
It will get information about a permissions
Tags:
Parameters:
method getRequirements [line 2081]
array getRequirements(
array
$pPackage)
|
|
getRequirements
Tags:
Parameters:
method getUTCTime [line 2366]
Retrieve a current UTC timestamp Simple map to BitDate object allowing tidy display elsewhere
method getUTCTimestamp [line 2374]
Retrieve a current UTC ISO timestamp Simple map to BitDate object allowing tidy display elsewhere
method getVersion [line 1946]
version getVersion(
[array
$pPackage = NULL], [
$pDefault = '0.0.0'], array
$pVersion)
|
|
getVersion will fetch the version number of a given package
Tags:
Parameters:
method get_display_offset [line 2381]
void get_display_offset(
[
$pUser = FALSE])
|
|
Retrieves the user's preferred offset for displaying dates.
Parameters:
method get_long_datetime [line 2466]
void get_long_datetime(
$pTimestamp, [
$pUser = FALSE])
|
|
Parameters:
method get_long_datetime_format [line 2440]
void get_long_datetime_format(
)
|
|
Retrieves the user's preferred long date/time format for displaying dates.
method get_long_date_format [line 2388]
void get_long_date_format(
)
|
|
Retrieves the user's preferred long date format for displaying dates.
method get_long_time_format [line 2414]
void get_long_time_format(
)
|
|
Retrieves the user's preferred long time format for displaying dates.
method get_short_datetime_format [line 2453]
void get_short_datetime_format(
)
|
|
Retrieves the user's preferred short date/time format for displaying dates.
method get_short_date_format [line 2401]
void get_short_date_format(
)
|
|
Retrieves the user's preferred short date format for displaying dates.
method get_short_time_format [line 2427]
void get_short_time_format(
)
|
|
Retrieves the user's preferred short time format for displaying dates.
method hasValidSenderEmail [line 324]
void hasValidSenderEmail(
[$mid
$pSenderEmail = NULL])
|
|
Determines if this site has a legitimate sender address set.
Tags:
Parameters:
method isFeatureActive [line 766]
none isFeatureActive(
$pKey
$pFeatureName)
|
|
check's if the specfied feature is active
Tags:
Parameters:
method isLive [line 1729]
isLive returns status of the IS_LIVE constant from config/kernel/config_inc.php
Tags:
method isPackageActive [line 597]
boolean isPackageActive(
$pPackageName
$pPackageName)
|
|
check's if a package is active.
Tags:
Parameters:
method isPackageActiveEarly [line 613]
boolean isPackageActiveEarly(
$pPackageName
$pPackageName)
|
|
check if a package is active; but only do this after making sure a package has had it's bit_setup_inc loaded if possible. This func exists for use in other packages bit_setup_inc's to avoid dependency on load order and ugly code
Tags:
Parameters:
method isPackageInstalled [line 636]
boolean isPackageInstalled(
$pPackageName
$pPackageName)
|
|
check's if a package is Installed
Tags:
Parameters:
method loadConfig [line 161]
void loadConfig(
[$pPackage
$pPackage = NULL])
|
|
Load all preferences and store them in $this->mConfig
Parameters:
method loadMimeTypes [line 1343]
mime loadMimeTypes(
string
$pExtension)
|
|
given an extension, return the mime type
Tags:
Parameters:
method loadPackage [line 1012]
none loadPackage(
$pPkgDir,
$pScanFile, [
$pAutoRegister = TRUE], [
$pOnce = TRUE], string
$)
|
|
Loads a package
Tags:
Parameters:
method lookupMimeType [line 1323]
mime lookupMimeType(
string
$pExtension)
|
|
given an extension, return the mime type
Tags:
Parameters:
method outputHeader [line 386]
method registerAppMenu [line 918]
none registerAppMenu(
$pKey
$pMenuHash, [
$pMenuTitle = NULL], [
$pTitleUrl = NULL], [
$pMenuTemplate = NULL], [
$pAdminPanel = FALSE])
|
|
Register global system menu. Due to the startup nature of this method, it need to belong in BitSystem instead of BitThemes, where it would more naturally fit.
Tags:
Parameters:
method registerConfig [line 1798]
TRUE registerConfig(
array
$pPackagedir, array
$pPreferences)
|
|
registerConfig
Tags:
Parameters:
method registerContentObjects [line 1837]
void registerContentObjects(
string
$pPackageName, hash
$pClassesHash)
|
|
registerContentObjects
Tags:
Parameters:
method registerModules [line 1826]
TRUE registerModules(
array
$pModuleHash)
|
|
registerModules
Tags:
Parameters:
method registerNotifyEvent [line 960]
TRUE registerNotifyEvent(
array
$pEventHash)
|
|
registerNotifyEvent
Tags:
Parameters:
method registerPackage [line 801]
none registerPackage(
$pKey
$pRegisterHash)
|
|
Define name, location and url DEFINE's
Tags:
Parameters:
method registerPackageInfo [line 1849]
TRUE registerPackageInfo(
array
$pPackage, array
$pInfoHash)
|
|
registerPackageInfo
Tags:
Parameters:
method registerPackageVersion [line 1991]
void registerPackageVersion(
array
$pPackage, array
$pVersion)
|
|
registerPackageVersion Holds the package version
Tags:
Parameters:
method registerPreferences [line 1813]
TRUE registerPreferences(
array
$pPackagedir, array
$pPreferences)
|
|
registerPreferences
Tags:
Parameters:
method registerRequirements [line 2017]
void registerRequirements(
$pPackage, array
$pReqHash, array
$pParams)
|
|
registerRequirements
Tags:
Parameters:
method registerSchemaConstraints [line 1766]
void registerSchemaConstraints(
array
$pPackage, array
$pTableName, array
$pConstraints)
|
|
registerSchemaConstraints
Tags:
Parameters:
method registerSchemaDefault [line 1901]
TRUE registerSchemaDefault(
array
$pPackage, array
$pMixedDefaultSql)
|
|
registerSchemaDefault
Tags:
Parameters:
method registerSchemaIndexes [line 1888]
TRUE registerSchemaIndexes(
array
$pPackage, array
$pIndexHash)
|
|
registerSchemaIndexes
Tags:
Parameters:
method registerSchemaSequences [line 1875]
TRUE registerSchemaSequences(
array
$pPackage, array
$pSeqHash)
|
|
registerSchemaSequences
Tags:
Parameters:
method registerSchemaTable [line 1747]
void registerSchemaTable(
array
$pPackage, array
$pTableName, array
$pDataDict, [array
$pRequired = FALSE], [array
$pTableOptions = NULL])
|
|
registerSchemaTable
Tags:
Parameters:
method registerUserPermissions [line 1781]
TRUE registerUserPermissions(
array
$pPackagedir, array
$pUserpermissions)
|
|
registerUserPermissions
Tags:
Parameters:
method scanPackages [line 1081]
none scanPackages(
[
$pScanFile = 'bit_setup_inc.php'], [
$pOnce = TRUE], [
$pSelect = ''], [
$pAutoRegister = TRUE], string
$)
|
|
scan all available packages. This is an *expensive* function. DO NOT call this functionally regularly , or arbitrarily. Failure to comply is punishable by death by jello suffication!
Tags:
Parameters:
method sendEmail [line 356]
void sendEmail(
$mid
$pMailHash)
|
|
centralized function for send emails
Tags:
Parameters:
method setBrowserTitle [line 1279]
none setBrowserTitle(
$pTitle, string
$)
|
|
set the title of the browser
Tags:
Parameters:
method setCanonicalLink [line 1294]
none setCanonicalLink(
$pRelativeUrl, string
$)
|
|
set the canonical page title
Tags:
Parameters:
method setConfig [line 249]
void setConfig(
string
$pName, string
$pValue)
|
|
Set a hash value in the mConfig hash. This does *NOT* store the value in the database. It does no checking for existing or duplicate values. the main point of this function is to limit direct accessing of the mConfig hash. I will probably make mConfig private one day.
Parameters:
method setHttpStatus [line 381]
void setHttpStatus(
$pHttpStatus
$pHttpStatus)
|
|
Set the http status, most notably for 404 not found for deleted content
Tags:
Parameters:
method setOnloadScript [line 1245]
none setOnloadScript(
$pJavscript, string
$pJavascript)
|
|
add javascript to the <body onload> attribute
Tags:
Parameters:
method setOnunloadScript [line 1256]
none setOnunloadScript(
$pJavscript, string
$pJavascript)
|
|
add javascript to the <body onunload> attribute
Tags:
Parameters:
method storeConfig [line 265]
void storeConfig(
$pName,
$pValue, [
$pPackage = NULL])
|
|
bitweaver needs lots of settings just to operate. loadConfig assigns itself the default preferences, then loads just the differences from the database. In storeConfig (and only when storeConfig is called) we make a second copy of defaults to see if preferences you are changing is different from the default. if it is the same, don't store it! So instead updating the whole prefs table, only updat "delta" of the changes delta from defaults.
Tags:
Parameters:
method storeConfigMatch [line 227]
TRUE storeConfigMatch(
string
$pPattern, [string
$pSelectValue = ""], [string
$pNewValue = NULL], [string
$pPackage = NULL])
|
|
storeConfigMatch set a group of config variables
Tags:
Parameters:
method storeVersion [line 1923]
TRUE storeVersion(
[array
$pPackage = NULL], array
$pVersion)
|
|
storeVersion will store the version number of a given package
Tags:
Parameters:
method validateVersion [line 2005]
TRUE validateVersion(
array
$pVersion)
|
|
validateVersion
Tags:
Parameters:
method verifyFeature [line 785]
none verifyFeature(
$pFeatureName
$pFeatureName, $pKey
1)
|
|
It will verify that the given feature is active or it will display the error template and die()
Tags:
Parameters:
method verifyFileExtension [line 1377]
corrected verifyFileExtension(
string
$pFile, [string
$pFileName = NULL])
|
|
given a file and optionally desired name, return the correctly extensioned file and mime type
Tags:
Parameters:
method verifyInstalledPackages [line 2274]
none verifyInstalledPackages(
[
$pSelect = 'installed'], string
$)
|
|
verifyInstalledPackages scan all available packages
Tags:
Parameters:
method verifyMimeType [line 1422]
mime verifyMimeType(
$pFile, string
$pExtension)
|
|
given a file, return the mime type
Tags:
Parameters:
method verifyPackage [line 652]
boolean verifyPackage(
$pPackageName
$pPackageName)
|
|
It will verify that the given package is active or it will display the error template and die()
Tags:
Parameters:
method verifyPermission [line 686]
void verifyPermission(
$pPermission, [
$pMsg = NULL])
|
|
DEPRECATED - this function has been moved into BitPermUser, use that
Parameters:
method verifyRequirements [line 2046]
TRUE verifyRequirements(
&$pReqHash, array
$pReqHash)
|
|
verifyRequirements
Tags:
Parameters:
|
|