| 1 | <?php |
||
| 10 | class ClickStatistic |
||
| 11 | { |
||
|
|
|||
| 12 | |||
| 13 | /** |
||
| 14 | * Banner image object |
||
| 15 | * @var array|\Banners\Models\BannerImage|mixed |
||
| 16 | */ |
||
| 17 | private $bannerImage; |
||
| 18 | |||
| 19 | public function __construct($imageIdMd5, $locale = NULL) { |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Run click statistic |
||
| 31 | */ |
||
| 32 | public function run() { |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Increase banner image clicks value |
||
| 44 | * @throws \Propel\Runtime\Exception\PropelException |
||
| 45 | */ |
||
| 46 | public function increaseClicks() { |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Go to banner image url |
||
| 54 | */ |
||
| 55 | private function goToUrl() { |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Get click statistic |
||
| 62 | * @param $imageId - banner image id |
||
| 63 | * @return string |
||
| 64 | */ |
||
| 65 | public static function getUrl($imageId) { |
||
| 66 | |||
| 70 | } |