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() { parent::__construct(Unsee_Session::getCurrent()); $this->expireAt(time() + static::$ttl); }
public static function keys($keys) { $redis = Zend_Registry::get('Redis'); $redis->select(static::DB); self::$prevDb = static::DB; return $redis->keys($keys); }
/** * Deletes the hash */ public function delete() { // Delete images $images = $this->getImages(); foreach ($images as $item) { $item->delete(); } parent::delete(); }