![]() |
PHPDevShell 3.1.3-Stable
PHP OOP RAD Development Framework
|
PHPDS: the main class for the PHPDevShell engine
It can be used either standalone or embedded
NOTE: none of these methods are meant to be called by you. For standalone mode, consult PHPDevShell programmers' guide. For embedded mode, use the PHPDSlib
| __construct | ( | $ | embedded = false | ) |
Constructor: initialize the instance and starts the configuration process
| $embedded |
| __destruct | ( | ) |
Destruct Class.
| _factory | ( | $ | classname, |
| $ | params = null, |
||
| $ | dependancy = null |
||
| ) |
shortcut to PHPDS_classFactory::factorClass()
| _log | ( | $ | data | ) |
Alias for log() - don't use it doesn't follow the guidelines
| unknown_type | $data |
| basepath | ( | $ | postfix = '' | ) |
Simply returns basepath
An optional postfix (i.e. folder name) can be given to retrieve the path a subfolder
| config | ( | ) | [protected] |
Main configuration method: load settings, create menus, templates, and so on After that, everything is ready to run all config_*() methods are meant to be called only at startup time by config()
| configCoreSettings | ( | ) | [protected] |
Fetch core settings from the site configuration stored in the database Also fetch some settings from the session and the locales
| configDb | ( | ) | [protected] |
Deal with database access configuration
| configSession | ( | ) | [protected] |
Deal with the "session" part of the configuration
In standalone mode, create the sessions ; in embedded mode, fetch the current session (we hijack the session, we don't create a new one)
NOTE: in embedded mode you MUST create a session before using PHPDSlib
| copyArray | ( | $ | source, |
| &$ | target, | ||
| $ | indexes, | ||
| $ | type = null |
||
| ) |
Copy an array to another and defaults to false if the value isn't set
| $source | array, the array to extract values from |
| $target | array, the array to add the values to |
| $indexes | array, the indexes of the values to copy |
| $type | string, the type of value to cast (currently only boolean or null for everything else) |
| copySettings | ( | $ | settings, |
| $ | type = null |
||
| ) | [protected] |
Copy settings from the database-loaded array. Converts and defaults to false if the value isn't set
| $source | array, the array to extract values from |
| $target | array, the array to add the values to |
| $indexes | array, the indexes of the values to copy |
| $type | string, the type of value to cast (currently only boolean or null for everything else) |
| get | ( | $ | field | ) |
This is a generic accessor to allow field access through an homogeneous and controlled way. For example:
$instance->get('core')
will return the core object as returned by the core() accessor method
| $field |
| includeConfigFile | ( | $ | path, |
| &$ | configuration | ||
| ) | [protected] |
Load one config file, if it exists
If it's ok, its name is added to $configuration['config_files']
| $path | absolute file name |
| isEmbedded | ( | ) |
Check if instance is embedded.
| loadConfig | ( | ) | [protected] |
Create a config from the config files, and store it in the instance field
The actual configuration is loaded from two files (one is generic, the other is specific) from the config/ folder.
| loadConfigFile | ( | $ | filename, |
| &$ | configuration | ||
| ) | [protected] |
Load one config file, if it exists; also tried a ".local" with the same name
| $filename | short file name |
| loadFunctions | ( | ) |
Loads extra broad based system functions.
| loadPluginsConfig | ( | &$ | configuration | ) | [protected] |
Load plugin-specific host-style config
This allows plugins to provide a configuration, for example when 1 plugin <=> 1 site
| log | ( | $ | data | ) |
Send info data to the debug subsystem (console, firebug, ...)
The goal of this function is to be called all thourough the code to be able to track bugs.
| string | $data |
| PHPDS_autoloader | ( | $ | class_name | ) |
Autoloader: when a class is instanciated, this method will load the proper php file
Note: the various folders where the files are looked for depends on the instance configuration, and on the current plugin
A model file is also loaded if present
| $class_name |
| PHPDS_configuration | ( | $ | configuration = null | ) |
Allow access to configuration, either read (no param) or write
This makes possible to start with a forced configuration, for testing for example
It returns the configuration array
CAUTION: an array is not an object so be carefull to use & if you need to modify it
| $configuration | possibly a new configuration array |
| PHPDS_core | ( | ) |
Allow access to the (formerly) global core subsystem
One is created if necessary.
You can override to use you own core subsystem
| PHPDS_db | ( | ) |
Allow access to the (formerly) global database subsystem
One is created if necessary.
You can override to use you own database subsystem
| PHPDS_debug | ( | ) |
Allow access to the global debugging subsystem
One is created if necessary.
You can override to use you own core subsystem
Custom Error Handler.
One is created if necessary.
You can override to use you own core subsystem
| PHPDS_lang | ( | ) |
Allow access to the (formerly) global templating subsystem
One is created if necessary.
You can override to use you own templating subsystem
| PHPDS_navigation | ( | ) |
Allow access to the (formerly) global navigation subsystem
One is created if necessary.
You can override to use you own navigation subsystem
| PHPDS_notif | ( | ) |
Allow access to the aynschronous notifications subsystem
One is created if necessary.
You can override to use you own tagging subsystem
Main instance of the notification module
| PHPDS_security | ( | ) |
Allow access to the (formerly) global security subsystem
One is created if necessary.
You can override to use you own security subsystem
| PHPDS_tagger | ( | ) |
Allow access to the tagging subsystem
One is created if necessary.
You can override to use you own tagging subsystem
| PHPDS_template | ( | $ | lazy = true | ) |
Allow access to the (formerly) global templating subsystem
One is created if necessary.
You can override to use you own templating subsystem
| boolean | $lazy | if true (default) the template is created if wasn't before |
| PHPDS_user | ( | ) |
Provides a variaty of user functions.
One is created if necessary.
You can override to use you own core subsystem
| run | ( | ) |
| sneak_class | ( | $ | classname, |
| $ | filename | ||
| ) |
Try to load a class from a file
NOTE: for performance reason we DON'T try first to see if the class already exists
| $classname | name of the class to look for |
| $filename | name of the file to look into |
| sneakClass | ( | $ | classname, |
| $ | filename | ||
| ) |
Try to load a class from a file
NOTE: for performance reason we DON'T try first to see if the class already exists
| $classname | name of the class to look for |
| $filename | name of the file to look into |
$basepath [protected] |
$classes [protected] |
$compatMode = 1 [protected] |
$configuration [protected] |
$core [protected] |
$db [protected] |
$debugInstance [protected] |
$embedded [protected] |
$lang [protected] |
$navigation [protected] |
$notif [protected] |
$security [protected] |
$stage = 1 [protected] |
$tagger [protected] |
Main instance of the tagger module
$template [protected] |
$user [protected] |