Server : Apache/2.4.58 (Ubuntu) System : Linux yumsem00.cafe24.com 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64 User : root ( 0) PHP Version : 8.2.14 Disable Function : NONE Directory : /var/www/html/wp-includes/22PhpOffice22/PhpSpreadsheet/Cell/ |
Upload File : |
<?php namespace PhpOffice\PhpSpreadsheet\Cell; class Hyperlink { /** * URL to link the cell to. * * @var string */ private $url; /** * Tooltip to display on the hyperlink. * * @var string */ private $tooltip; /** * Create a new Hyperlink. * * @param string $url Url to link the cell to * @param string $tooltip Tooltip to display on the hyperlink */ public function __construct($url = '', $tooltip = '') { // Initialise member variables $this->url = $url; $this->tooltip = $tooltip; } /** * Get URL. * * @return string */ public function getUrl() { return $this->url; } /** * Set URL. * * @param string $url * * @return $this */ public function setUrl($url): static { $this->url = $url; return $this; } /** * Get tooltip. * * @return string */ public function getTooltip() { return $this->tooltip; } /** * Set tooltip. * * @param string $tooltip * * @return $this */ public function setTooltip($tooltip): static { $this->tooltip = $tooltip; return $this; } /** * Is this hyperlink internal? (to another worksheet). */ public function isInternal(): bool { return str_contains($this->url, 'sheet://'); } public function getTypeHyperlink(): string { return $this->isInternal() ? '' : 'External'; } /** * Get hash code. * * @return string Hash code */ public function getHashCode(): string { return md5( $this->url . $this->tooltip . __CLASS__ ); } }