setUrl($pUrl); $this->setTooltip($pTooltip); } /** * Get URL. * * @return string */ public function getUrl(): string { return $this->url; } /** * Set URL. * * @param string $value * * @return self */ public function setUrl(string $value = ''): self { $this->url = $value; return $this; } /** * Get tooltip. * * @return string */ public function getTooltip(): string { return $this->tooltip; } /** * Set tooltip. * * @param string $value * * @return self */ public function setTooltip(string $value = ''): self { $this->tooltip = $value; return $this; } /** * Get slide number. * * @return int */ public function getSlideNumber(): int { return $this->slideNumber; } /** * Set slide number. * * @param int $value * * @return self */ public function setSlideNumber(int $value = 1): self { $this->url = 'ppaction://hlinksldjump'; $this->slideNumber = $value; return $this; } /** * Is this hyperlink internal? (to another slide). * * @return bool */ public function isInternal(): bool { return false !== \strpos($this->url, 'ppaction://'); } /** * Get hash code. * * @return string Hash code */ public function getHashCode(): string { return \md5($this->url . $this->tooltip . __CLASS__); } /** * Get hash index. * * Note that this index may vary during script execution! Only reliable moment is * while doing a write of a workbook and when changes are not allowed. * * @return int|null Hash index */ public function getHashIndex(): ?int { return $this->hashIndex; } /** * Set hash index. * * Note that this index may vary during script execution! Only reliable moment is * while doing a write of a workbook and when changes are not allowed. * * @param int $value Hash index * * @return $this */ public function setHashIndex(int $value) { $this->hashIndex = $value; return $this; } /** * Get whether or not to use text color for a hyperlink, instead of theme color. * * @see https://docs.microsoft.com/en-us/openspecs/office_standards/ms-odrawxml/014fbc20-3705-4812-b8cd-93f5af05b504 * * @return bool whether or not to use text color for a hyperlink, instead of theme color */ public function isTextColorUsed(): bool { return $this->isTextColorUsed; } /** * Set whether or not to use text color for a hyperlink, instead of theme color. * * @see https://docs.microsoft.com/en-us/openspecs/office_standards/ms-odrawxml/014fbc20-3705-4812-b8cd-93f5af05b504 * * @param bool $isTextColorUsed * * @return self */ public function setIsTextColorUsed(bool $isTextColorUsed): self { $this->isTextColorUsed = $isTextColorUsed; return $this; } }