PluginProbe
wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin / 6.5.1.7
wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin v6.5.1.7
6.5.1.7 6.5.1.6 6.5.1.5 6.5.1.4 6.5.1.3 6.5.1.2 6.5.1.1 6.5.0.9 6.5.0.8 6.5.0.7 6.5.0.6 trunk 3.4.2.40 3.4.2.41 3.4.2.42 3.4.2.43 3.4.2.44 3.4.2.45 3.4.2.46 3.4.2.47 3.4.2.48 3.4.2.49 3.4.2.50 6.3.2 6.3.3.1 All 47 releases
wpdatatables / lib / phpoffice / phpspreadsheet / src / PhpSpreadsheet / Cell / Hyperlink.php

Hyperlink.php in wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin 6.5.1.7, at lib/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Hyperlink.php

114 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace PhpOffice\PhpSpreadsheet\Cell;
4
5 class Hyperlink
6 {
7 /**
8 * URL to link the cell to.
9 *
10 * @var string
11 */
12 private $url;
13
14 /**
15 * Tooltip to display on the hyperlink.
16 *
17 * @var string
18 */
19 private $tooltip;
20
21 /**
22 * Create a new Hyperlink.
23 *
24 * @param string $url Url to link the cell to
25 * @param string $tooltip Tooltip to display on the hyperlink
26 */
27 public function __construct($url = '', $tooltip = '')
28 {
29 // Initialise member variables
30 $this->url = $url;
31 $this->tooltip = $tooltip;
32 }
33
34 /**
35 * Get URL.
36 *
37 * @return string
38 */
39 public function getUrl()
40 {
41 return $this->url;
42 }
43
44 /**
45 * Set URL.
46 *
47 * @param string $url
48 *
49 * @return $this
50 */
51 public function setUrl($url)
52 {
53 $this->url = $url;
54
55 return $this;
56 }
57
58 /**
59 * Get tooltip.
60 *
61 * @return string
62 */
63 public function getTooltip()
64 {
65 return $this->tooltip;
66 }
67
68 /**
69 * Set tooltip.
70 *
71 * @param string $tooltip
72 *
73 * @return $this
74 */
75 public function setTooltip($tooltip)
76 {
77 $this->tooltip = $tooltip;
78
79 return $this;
80 }
81
82 /**
83 * Is this hyperlink internal? (to another worksheet).
84 *
85 * @return bool
86 */
87 public function isInternal()
88 {
89 return strpos($this->url, 'sheet://') !== false;
90 }
91
92 /**
93 * @return string
94 */
95 public function getTypeHyperlink()
96 {
97 return $this->isInternal() ? '' : 'External';
98 }
99
100 /**
101 * Get hash code.
102 *
103 * @return string Hash code
104 */
105 public function getHashCode()
106 {
107 return md5(
108 $this->url .
109 $this->tooltip .
110 __CLASS__
111 );
112 }
113 }
114