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(); }
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; } }
public function __construct() { parent::__construct(Unsee_Session::getCurrent()); $this->expireAt(time() + static::$ttl); }