create_module_installer.php
Table of Contents
Functions
- make_install() : string
- create everything needed for installing a module
- recurse_ls() : mixed
- to get the list of file and folder
- generate_index() : mixed
- beautify_db_writing() : mixed
Functions
make_install()
create everything needed for installing a module
make_install(string $module_name, string $object_list[, bool $sql_only = false ][, mixed $public = true ]) : string
Will create the file install.php with sql query and list of file needed inside. Will also create both index.php for admin and public
To call from CLI php create_module_installer.php module_name sql_object1,sql_object2,... true|false if the module has no db php create_module_installer.php module_name no_db
Parameters
- $module_name : string
-
name of the module
- $object_list : string
-
sql object of the module name separated by a ','
- $sql_only : bool = false
-
Optional. True, only create the sql part, ignore file
- $public : mixed = true
Return values
string —error or success message
recurse_ls()
to get the list of file and folder
recurse_ls(mixed $path[, mixed $base_path = '' ]) : mixed
modified version of filesystem.php to also be used by CLI call
Parameters
- $path : mixed
- $base_path : mixed = ''
generate_index()
generate_index(mixed $module_name, mixed $path, mixed $public) : mixed
Parameters
- $module_name : mixed
- $path : mixed
- $public : mixed
beautify_db_writing()
beautify_db_writing(mixed $str) : mixed
Parameters
- $str : mixed