示例#1
0
 public function __construct(Unsee_Hash $hash, $imgKey = null)
 {
     $newImage = is_null($imgKey);
     if ($newImage) {
         $imgKey = uniqid();
     }
     parent::__construct($hash->key . '_' . $imgKey);
     if ($newImage) {
         $keys = Unsee_Image::keys($hash->key . '*');
         $this->num = count($keys);
         $this->expireAt(time() + $hash->ttl());
     }
     $this->setSecureParams();
 }