commit | author | age | ||
6f84c6 | 1 | <?php |
JK | 2 | class BotImageGG extends BotImage { |
3 | protected $hash; | |
4 | ||
5 | function __construct($hash) { | |
6 | $this->hash = $hash; | |
7 | } | |
8 | ||
9 | function getHash() { | |
10 | return $this->hash; | |
11 | } | |
12 | ||
13 | function getImage() { | |
14 | return imagecreatefromstring($this->getImageData()); | |
15 | } | |
16 | ||
17 | function getImageData() { | |
18 | if($this->data === NULL) { | |
0868e0 | 19 | $push = new BotAPIGG(); |
6f84c6 | 20 | $this->data = $push->getImage($this->hash); |
JK | 21 | } |
22 | ||
23 | return $this->data; | |
24 | } | |
25 | } | |
26 | ?> |