Exemplo n.º 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();
 }
Exemplo n.º 2
0
 public function __construct($key = null)
 {
     parent::__construct($key);
     if (empty($key)) {
         $this->setNewHash();
         $this->timestamp = time();
         $this->ttl = self::$ttlTypes[0];
         $this->expireAt(time() + static::EXP_DAY);
         $this->max_views = 1;
         $this->views = 0;
         $this->no_download = true;
         $this->strip_exif = true;
         $this->comment = Zend_Registry::get('config')->image_comment;
         $this->sess = Unsee_Session::getCurrent();
         $this->watermark_ip = true;
         $this->allow_anonymous_images = false;
     }
 }
Exemplo n.º 3
0
 public function __construct()
 {
     parent::__construct(Unsee_Session::getCurrent());
     $this->expireAt(time() + static::$ttl);
 }