예제 #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;
 }
예제 #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;
 }
예제 #3
0
 public function __construct(ImagickTaskQueue $taskQueue, PageInfo $pageInfo)
 {
     $activeCategory = $pageInfo->getCategory();
     $activeExample = $pageInfo->getExample();
     $this->taskQueue = $taskQueue;
     $this->activeCategory = $activeCategory;
     $this->activeExample = $activeExample;
 }
예제 #4
0
 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;
 }
예제 #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;
 }
예제 #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;
 }
예제 #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];
 }
예제 #8
0
 /**
  *
  */
 public function getKey()
 {
     $key = hash("sha256", json_encode($this->params));
     return sprintf("%s_%s_%s", $this->pageInfo->getCategory(), $this->pageInfo->getExample(), $key);
 }
예제 #9
0
 function __construct(\ImagickDemo\Helper\PageInfo $pageInfo)
 {
     $category = $pageInfo->getCategory();
     $example = $pageInfo->getExample();
     $this->category = strtolower($category);
     $this->example = strtolower($example);
 }
예제 #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);
 }