How to give files in zip class

hiii
i want to use soem zip class
but don’t know how to automatically add files because that class is taking every file one by one as here is code of that class
Create Zip Files Dynamically Using PHP - Grant Hinkson Blog
on bottom of this page is mention where that giving file or folder but i want that i just give file link path and give zip that folder and
like i was using in my last zip class
here is code where m giving files to my last class

/ Set the directory
$dir = "A Flat";

$fileList = array();

if (is_dir($dir)){
    if ($open = opendir($dir)){
        while(false !== ($read = readdir($open))){
            if ($read != '.' && $read != '..'){
                echo $read." - File Size: ".filesize($dir."/".$read)." bytes<br />";
                $fileList[] = $read;
            }
        }
    } else {
        echo "Unable to open the directory at \\"$dir\\"";
    }
} else {
    echo "The directory ( $dir ) is not a valid path!";
} 

// Make sure the array is at least "1" value
if (sizeof($fileList) > 0){
    // Include the PCLZip class
    include_once('pclzip.lib.php');
    
    // Create a new instance of the class
    $archive = new PclZip('mp3_files.zip');
    
    // Build a list of the files
    $files = implode(', ', $fileList);
    
    // Add the files to the archive
    $v_list = $archive->create($files);
    
    // Finish up
    if ($v_list == 0){
        die("Error : ".$archive->errorInfo(true));
    } else {
        header('Location: mp3_files.zip');
    }
} 

this is thread link where i got this solution last time

but now how i give files in this class
here is code where i want to give files with just file path

$zipTest = new zipfile();
$zipTest->add_dir("images/");
$zipTest->add_file("images/box1.jpg", "images/box1.jpg");
$zipTest->add_file("images/box2.jpg", "images/box2.jpg");

// Return Zip File to Browser
Header("Content-type: application/octet-stream");
Header ("Content-disposition: attachment; filename=zipTest.zip");
echo $zipTest->file();