Esempio n. 1
0
 /**
  * @param null $category
  * @param null $example
  * @internal param null $activeCategory
  * @internal param null $activeExample
  */
 function __construct(PageInfo $pageInfo)
 {
     $this->activeCategory = $pageInfo->getCategory();
     //$category;
     $this->activeExample = $pageInfo->getExample();
     //$example;
 }
Esempio n. 2
0
 /**
  * @param $category
  * @param $example
  */
 function __construct(PageInfo $pageInfo)
 {
     $this->category = $pageInfo->getCategory();
     $this->currentExample = $pageInfo->getExample();
     $this->exampleList = $this->getCategoryList($this->category);
     $this->pageInfo = $pageInfo;
 }
Esempio n. 3
0
 public function __construct(ImagickTaskQueue $taskQueue, PageInfo $pageInfo)
 {
     $activeCategory = $pageInfo->getCategory();
     $activeExample = $pageInfo->getExample();
     $this->taskQueue = $taskQueue;
     $this->activeCategory = $activeCategory;
     $this->activeExample = $activeExample;
 }
 function __construct(PageInfo $pageInfo, ImagickTaskQueue $taskQueue)
 {
     $activeCategory = $pageInfo->getCategory();
     $activeExample = $pageInfo->getExample();
     $this->imageBaseURL = getImageURL($activeCategory, $activeExample);
     $this->customImageBaseURL = getCustomImageURL($activeCategory, $activeExample);
     $this->imageStatusBaseURL = getImageStatusURL($activeCategory, $activeExample);
     $this->taskQueue = $taskQueue;
 }
Esempio n. 5
0
 public function getImageCacheFilename(PageInfo $pageInfo, $params)
 {
     $category = $pageInfo->getCategory();
     $example = $pageInfo->getExample();
     $filename = $this->getPath() . "/" . $category . '/' . $example . '/' . $example;
     if (!empty($params)) {
         $filename .= '_' . md5(json_encode($params));
     }
     return $filename;
 }
Esempio n. 6
0
 public function __construct(PageInfo $pageInfo, ImagickTaskQueue $taskQueue)
 {
     $activeCategory = $pageInfo->getCategory();
     $activeExample = $pageInfo->getExample();
     $this->imageBaseURL = \ImagickDemo\Route::getImageURL($activeCategory, $activeExample);
     $this->orignalImageBaseURL = \ImagickDemo\Route::getOriginalImageURL($activeCategory, $activeExample);
     $this->customImageBaseURL = \ImagickDemo\Route::getCustomImageURL($activeCategory, $activeExample);
     $this->imageStatusBaseURL = \ImagickDemo\Route::getImageStatusURL($activeCategory, $activeExample);
     $this->taskQueue = $taskQueue;
 }
Esempio n. 7
0
 public static function getDIInfo(PageInfo $pageInfo)
 {
     $category = $pageInfo->getCategory();
     $example = $pageInfo->getExample();
     if ($category == null || $example == null) {
         return ['ImagickDemo\\Control\\NullControl', []];
     }
     $exampleDefinition = self::getExampleDefinition($category, $example);
     $controlClass = $exampleDefinition[1];
     $params = [];
     if (array_key_exists('defaultParams', $exampleDefinition) == true) {
         foreach ($exampleDefinition['defaultParams'] as $name => $value) {
             $defaultName = 'default' . ucfirst($name);
             $params[$defaultName] = $value;
         }
     }
     return [$controlClass, $params];
 }
Esempio n. 8
0
 /**
  *
  */
 public function getKey()
 {
     $key = hash("sha256", json_encode($this->params));
     return sprintf("%s_%s_%s", $this->pageInfo->getCategory(), $this->pageInfo->getExample(), $key);
 }
Esempio n. 9
0
 function __construct(\ImagickDemo\Helper\PageInfo $pageInfo)
 {
     $category = $pageInfo->getCategory();
     $example = $pageInfo->getExample();
     $this->category = strtolower($category);
     $this->example = strtolower($example);
 }
Esempio n. 10
0
 function __construct(PageInfo $pageInfo)
 {
     $category = $pageInfo->getCategory();
     $example = $pageInfo->getExample();
     $this->categoryCase = $category;
     $this->exampleCase = $example;
     $this->category = strtolower($category);
     $this->example = strtolower($example);
 }