1. Go to this page and download the library: Download spoova/enlist library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$Enlist->source(__DIR__.'/src/images')->view();
$Enlist->dirFiles();
$Enlist->data($dirFiles); //get data returned by dirFiles() method into $dirFiles
$Enlist->rename('jpg');
$Enlist->data($renamed); //get data returned by rename() method into $renamed
$Enlist->debug(2); //turn on debugging with ErrorException thrown
$Enlist->source(__DIR__.'/src/images');
$Enlist->view();
$Enlist->prefix('image-');
$Enlist->rename('.', $result);
var_dump($result);
$Enlist->debug();
$Enlist->source(__DIR__.'/src/images')->view();
$Enlist->dirFiles();
$Enlist->data($dirFiles); //get data returned by dirFiles() method into $dirFiles
$Enlist->rename('jpg');
$Enlist->data($renamed); //get data returned by rename() method into $renamed
$Enlist->debugs($debugs); //get first error returned into $debugs
var_dump($result);
$Enlist->source(__DIR__.'/src/images');
if( $Enlist->sourceValid() ) {
$Enlist->withSession('unique_session_name'); //set a session storage name
$Enlist->prefix('image-');
$result = $Enlist->rename('png');
$Enlist->reverse($reversals); //reverse back to previous names
var_dump($reversals);
}
$Enlist->source(__DIR__.'/src/images');
if( $Enlist->sourceValid() ) {
$Enlist->withSession('my_enlist_session_name'); //set a session storage name
$Enlist->prefix('image-');
$result = $Enlist->rename('png');
$Enlist->reverse($reversals, 'my_enlist_session_name'); //reverse back to previous names using specific storage name
var_dump($reversals);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.