Esempio n. 1
0
 /**
  * @param $category
  * @param $example
  * @param $imageFunction
  * @param \ImagickDemo\Control $control
  * @param \ImagickDemo\Example $exampleController
  * @internal param array $customImageParams
  * @return JsonResponse
  */
 public function getImageJobStatus(ImageCachePath $imageCachePath, PageInfo $pageInfo, Control $control, Example $exampleController)
 {
     $data = [];
     $customImageParams = $exampleController->getCustomImageParams();
     $fullParams = $control->getFullParams($customImageParams);
     $filename = $imageCachePath->getImageCacheFilename($pageInfo, $fullParams);
     $data['filename'] = $filename;
     $data['finished'] = false;
     $data['params'] = $fullParams;
     foreach (getKnownExtensions() as $extension) {
         if (file_exists($filename . '.' . $extension) == true) {
             $data['finished'] = true;
             break;
         }
     }
     return new JsonBody($data);
 }
Esempio n. 2
0
 public function getFilename()
 {
     return ImageCachePath::getImageCacheFilename($this->pageInfo, $this->params);
 }