/** * Get unused hash * * Will create a new object if current hash is used * but will not return this object * * The variable 'unused' will be set if a new * object is created */ public function getHashUnused() { if (!$this->isUsed()) { $this->unused = static::getByDomain($this->domain, $this->user); return $this->unused->getHash(); } return $this->getHash(); }