1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace app\forks\galleryManager;
- class GalleryImage
- {
- public $name;
- public $description;
- public $id;
- public $rank;
- /**
- * @var GalleryBehavior
- */
- protected $galleryBehavior;
- /**
- * @param GalleryBehavior $galleryBehavior
- * @param array $props
- */
- function __construct(GalleryBehavior $galleryBehavior, array $props)
- {
- $this->galleryBehavior = $galleryBehavior;
- $this->name = isset($props['name']) ? $props['name'] : '';
- $this->description = isset($props['description']) ? $props['description'] : '';
- $this->id = isset($props['id']) ? $props['id'] : '';
- $this->rank = isset($props['rank']) ? $props['rank'] : '';
- $this->type = isset($props['type']) ? $props['type'] : '';
- }
- /**
- * @param string $version
- *
- * @return string
- */
- public function getUrl($version)
- {
- return $this->galleryBehavior->getUrl($this->id, $version);
- }
- }
|