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] Get an instance of the object
- $oDateTools = lib_lepton::getToolInstance("datetools");
-
- // [2]
- $iCurrentTime = Time();
- echo $oDateTools->toHTML( $iCurrentTime );
-
- // [2.1]
- $oDateTools->setFormat( "%A, %e. %B %Y - %H:%M:%S" );
- echo $oDateTools->toHTML( $iCurrentTime );
-
- // [2.2]
- $oDateTools->set_core_language( "FR" );
- echo $oDateTools->toHTML( $iCurrentTime );
-
- // [2.3]
- echo LEPTON_tools::display( $oDateTools->test_locale("DE") );
-
- // [2.4]
- $oDateTools->setFormat('%B %e, %Y %H:%M');
- echo $oDateTools->toHTML( $iCurrentTime );
-
- // [2.5] -- works only on currend L* 5.0.1
- $oDateTools->useINTL = TRUE;
- $oDateTools->set_core_language( "DE" );
- $oDateTools->setFormat("'Heute ist der 'dd MMMM yyyy G '. und es ist ' HH:mm:ss zzz 'Uhr'");
- echo $oDateTools->toHTML( $iCurrentTime );
See also
LEPTON_tools
last edit: 23. Jan 2021 CET 20:30:58