lib_lepton: usage
Lib_lepton offers a lot of easy to use external php-scripts, for example "class upload" or "class mysqldump".
All scripts can be initiallized via class lib_lepton. Please have a quick look at the code of this class how to initialize the script of your choice, there are always some links in the case comments to lead you to the documentation of the script.
As a first example following code explains how to use Lepton MySqlDump, for more details for class MySqlDump see also core info page:
(work in progress)
- // see documentation on github: https://github.com/ifsnop/mysqldump-php
- // [1] list tables to be saved
- $tables = [
- TABLE_PREFIX."addons",
- TABLE_PREFIX."settings",
- TABLE_PREFIX."users",
- TABLE_PREFIX."mod_droplets"
- ];
- // [2] set params for class
- $sParam2 = [
- "include-tables"=>$tables,
- "compress" => "none"
- ];
- // [3] create random part of the file
- $name = random_int(10000, 99999);
- // [4] get a class instance
- $dump = lib_lepton::getToolInstance("mysqldump", $sParam2);
- // [5] use the method to save the tables in the /temp directory of LEPTON
- $dump->start(LEPTON_PATH.'/temp/'.$name.'_dump.sql');
last edit: 11. May 2025 CEST 21:40:42
Lib_lepton :: available classes
At this time the following "sub" libs are available (L* 7.IV).
# pclzip [2.8.2]
# php-zip [4.0.1]
# upload [2.1.6]
# mysqldump [2.12]
# htmlpurifier [4.18.0]
# vcard [2.0.0]
# fpdf [1.86]
listing 7.4.b
See also
LEPTON_tools
last edit: 11. May 2025 CEST 23:05:08