Image::getFile PHP Method

getFile() public method

public getFile ( )
    public function getFile()
    {
        return $this->file;
    }

Usage Example

Example #1
0
 public function readFolder()
 {
     $folder = $this->customer->getFolderName();
     $dir = DIR_IMAGE . "catalog/" . $folder;
     $allfiles = scandir($dir);
     $img_links = array();
     $counting = 0;
     foreach ($allfiles as $image) {
         //if the file is not hidden get the the URI
         if (substr($image, 0, 1) != '.') {
             //Once we get certified the config.php needs to be modified.
             $modify_image = new Image(DIR_IMAGE . "catalog/" . $folder . "/" . $image);
             // $mark = new Image(DIR_IMAGE. "logo.png");
             $width = $modify_image->getWidth() * 0.2;
             $height = $modify_image->getHeight() * 0.2;
             // $mark->resize($width, $height);
             // $modify_image->watermark($mark);
             $size = $width * $height;
             $modify_image->save($modify_image->getFile());
             $img_links[$counting]['source'] = HTTPS_SERVER . "/image/catalog/" . $folder . "/" . $image;
             $img_links[$counting]['width'] = $modify_image->getWidth();
             $img_links[$counting]['height'] = $modify_image->getHeight();
             $counting++;
         }
     }
     return $img_links;
 }
All Usage Examples Of Image::getFile