static bool backup(
string
$module
)
|
|
Creates module backup point.
Parameters:
|
string |
$module: |
module name |
API Tags:
| Return: | true on success, false otherwise |
| Access: | public |
static void call_common_methods(
$method, [
$cached = true], [
$args = array()]
)
|
|
Parameters:
API Tags:
static bool check_access(
object module
$mod, string
$m
)
|
|
Checks access to a method.
First parameter is a module object and second is a method in this module.
If you want to restric access to a method just create a method called 'methodname_access' returning false if you want restrict user from accessing 'methodname' method.
check_access is called automatically with each pack_module call.
Parameters:
|
object module |
$mod: |
|
|
string |
$m: |
function name |
API Tags:
| Return: | true if access is granted, false otherwise |
| Access: | public |
static void check_common_methods(
$method, [
$cached = true]
)
|
|
Parameters:
API Tags:
static void create_common_cache(
)
|
|
API Tags:
static bool create_data_dir(
string
$name
)
|
|
Creates default data directory for module.
Do not use directly.
Parameters:
|
string |
$name: |
module name |
API Tags:
| Return: | true if directory was created or already exists, false otherwise |
| Access: | public |
static array create_load_priority_array(
)
|
|
Creates array of installed modules indexed by priority of loading, based on dependencies.
Do not use directly.
API Tags:
| Return: | array containing information about modules priorities |
| Access: | public |
static void &create_root(
)
|
|
Creates root(first) module instance.
Do not use directly.
API Tags:
static bool downgrade(
string
$module, int
$to_version
)
|
|
This function performs downgrade process when it is requested by Setup module.
Do not use directly.
Parameters:
|
string |
$module: |
module name |
|
int |
$to_version: |
version to which module should be downgraded |
API Tags:
| Return: | true if module was downgraded sucesfully, false otherwise |
| Access: | public |
static bool exists(
$mod
)
|
|
Check if module passed as first parameter with version passed as second parameter can be found in Modules' directory.
Parameters:
API Tags:
| Return: | true if module was found, false otherwise |
| Access: | public |
static void get_data_dir(
$name
)
|
|
Parameters:
API Tags:
static bool &get_instance(
string
$path
)
|
|
Returns instance of module.
Parameters:
|
string |
$path: |
module name |
API Tags:
| Return: | null if module instance was not found, requested module object otherwise |
| Access: | public |
static array get_load_priority_array(
[
$force = false]
)
|
|
Returns an array of installed modules indexed by priority of loading, based on dependencies.
Do not use directly.
Parameters:
API Tags:
| Return: | array containing information with modules priorities |
| Access: | public |
static string get_module_dir_path(
string
$name
)
|
|
Returns directory path to the module including module main directory.
Parameters:
|
string |
$name: |
module name |
API Tags:
| Return: | directory path to the module |
| Access: | public |
static string get_module_file_name(
$name
)
|
|
Returns main filename part of the module.
Module named Box, instance 1: get_module_file_name returns 'Box'
Note that file names always contain some other parts like 'Box_0.php'
Parameters:
API Tags:
| Return: | directory path to the module |
| Access: | public |
static void get_processed_modules(
)
|
|
API Tags:
static void include_common(
string
$class_name,
$version
)
|
|
Includes file with module common class.
Do not use directly.
Parameters:
|
string |
$class_name: |
module name |
|
|
$version: |
|
API Tags:
static void include_install(
string
$class_name
)
|
|
Includes file with module installation class.
Do not use directly.
Parameters:
|
string |
$class_name: |
module name |
API Tags:
static void include_main(
string
$class_name,
$version
)
|
|
Includes file with module main class.
Do not use directly.
Parameters:
|
string |
$class_name: |
module name |
|
|
$version: |
|
API Tags:
static bool install(
string
$module_to_install, [integer
$version = null], [
$check = true]
)
|
|
Installs module given as first parameter.
Additionally, this function calls upgrade to version given as second parameter.
Parameters:
|
string |
$module_to_install: |
module name |
|
integer |
$version: |
module version |
|
|
$check: |
|
API Tags:
| Return: | true if installation success, false otherwise |
| Access: | public |
static integer is_installed(
string
$module_to_install
)
|
|
Checks if module is installed.
Parameters:
|
string |
$module_to_install: |
module name |
API Tags:
| Return: | version of installed module or -1 when it's not installed |
| Access: | public |
static array list_backups(
)
|
|
Returns list of available backups.
API Tags:
| Return: | list of backups, each backup point is described as an array with fields 'name', 'version', 'date' |
| Access: | public |
static array list_modules(
)
|
|
Creates list of modules currently available to install along with list of available versions.
API Tags:
| Return: | array built as follows: array('Box'=>array(0,1)...) |
| Access: | public |
static void load_modules(
)
|
|
Loads all installed classes definitions.
Do not use directly.
API Tags:
static object newly &new_instance(
module
$mod,
$parent,
$name, [
$clear_vars = false]
)
|
|
Creates new module instance.
Do not use directly. Use pack_module instead.
Parameters:
|
module |
$mod: |
name |
|
|
$parent: |
|
|
|
$name: |
|
|
|
$clear_vars: |
|
API Tags:
| Return: | created module object |
| Access: | public |
Information Tags:
| Throws: | exception 'module not loaded' if the module is not registered |
static void register(
string
$mod, integer
$version, array
&$module_table
)
|
|
Registers module passed as first parameter in array passed as third parameter.
It is used to mark in an array that module is loaded and provides some external modules.
Do not use directly.
Parameters:
|
string |
$mod: |
module name |
|
integer |
$version: |
module version |
|
array |
&$module_table: |
modules list |
API Tags:
static bool remove_data_dir(
string
$name
)
|
|
Removes default data directory of a module.
Do not use directly.
Parameters:
|
string |
$name: |
module name |
API Tags:
| Return: | true if directory was removed or did not exist, false otherwise |
| Access: | public |
static bool restore(
string
$module, string
$date, [bool
$delete_old_data = true]
)
|
|
Restores module data based from backup.
Parameters:
|
string |
$module: |
module name |
|
string |
$date: |
date on which desired backup was made |
|
bool |
$delete_old_data: |
if set to true it will delete all current module data |
API Tags:
| Return: | true on success, false otherwise |
| Access: | public |
static bool uninstall(
string
$module_to_uninstall
)
|
|
Uninstalls module.
Parameters:
|
string |
$module_to_uninstall: |
module name |
API Tags:
| Return: | true if uninstallation success, false otherwise |
| Access: | public |
static void unregister(
string
$mod, integer
&$module_table, array
2
)
|
|
Unregisters module passed as first parameter from array passed as third parameter.
It is used to mark in an array that module is not loaded and doesn't provide some external modules anymore.
Do not use directly.
Parameters:
|
array |
2: |
modules list |
|
string |
$mod: |
module name |
|
integer |
&$module_table: |
module version |
API Tags:
static bool upgrade(
string
$module, int
$to_version
)
|
|
This function performs upgrade process when it is requested by Setup module.
Do not use directly.
Parameters:
|
string |
$module: |
module name |
|
int |
$to_version: |
version to which module should be upgraded |
API Tags:
| Return: | true is module was upgraded sucesfully, false otherwise |
| Access: | public |