feel free to keep it strictly simple...

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)

  1. // see documentation on github: https://github.com/ifsnop/mysqldump-php
  2. // [1] list tables to be saved
  3. $tables = [
  4. TABLE_PREFIX."addons",
  5. TABLE_PREFIX."settings",
  6. TABLE_PREFIX."users",
  7. TABLE_PREFIX."mod_droplets"
  8. ];
  9. // [2] set params for class
  10. $sParam2 = [
  11. "include-tables"=>$tables,
  12. "compress" => "none"
  13. ];
  14. // [3] create random part of the file
  15. $name = random_int(10000, 99999);
  16. // [4] get a class instance
  17. $dump = lib_lepton::getToolInstance("mysqldump", $sParam2);
  18. // [5] use the method to save the tables in the /temp directory of LEPTON
  19. $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