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 date_tools, for more details for class mysqldump see also core info page:

  1. // [1] Get an instance of the object
  2. $oDateTools = lib_lepton::getToolInstance("datetools");
  3. // [2]
  4. $iCurrentTime = Time();
  5. echo $oDateTools->toHTML( $iCurrentTime );
  6. // [2.1]
  7. $oDateTools->setFormat( "%A, %e. %B %Y - %H:%M:%S" );
  8. echo $oDateTools->toHTML( $iCurrentTime );
  9. // [2.2]
  10. $oDateTools->set_core_language( "FR" );
  11. echo $oDateTools->toHTML( $iCurrentTime );
  12. // [2.3]
  13. echo LEPTON_tools::display( $oDateTools->test_locale("DE") );
  14. // [2.4]
  15. $oDateTools->setFormat('%B %e, %Y %H:%M');
  16. echo $oDateTools->toHTML( $iCurrentTime );
  17. // [2.5] -- works only on currend L* 5.0.1
  18. $oDateTools->useINTL = TRUE;
  19. $oDateTools->set_core_language( "DE" );
  20. $oDateTools->setFormat("'Heute ist der 'dd MMMM yyyy G '. und es ist ' HH:mm:ss zzz 'Uhr'");
  21. echo $oDateTools->toHTML( $iCurrentTime );
See also: LEPTON_tools
last edit: 23. Jan 2021 CET 20:30:58