ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Hyperlink.php
Go to the documentation of this file.
1<?php
2
4
6{
12 private $url;
13
19 private $tooltip;
20
27 public function __construct($pUrl = '', $pTooltip = '')
28 {
29 // Initialise member variables
30 $this->url = $pUrl;
31 $this->tooltip = $pTooltip;
32 }
33
39 public function getUrl()
40 {
41 return $this->url;
42 }
43
51 public function setUrl($value)
52 {
53 $this->url = $value;
54
55 return $this;
56 }
57
63 public function getTooltip()
64 {
65 return $this->tooltip;
66 }
67
75 public function setTooltip($value)
76 {
77 $this->tooltip = $value;
78
79 return $this;
80 }
81
87 public function isInternal()
88 {
89 return strpos($this->url, 'sheet://') !== false;
90 }
91
95 public function getTypeHyperlink()
96 {
97 return $this->isInternal() ? '' : 'External';
98 }
99
105 public function getHashCode()
106 {
107 return md5(
108 $this->url .
109 $this->tooltip .
110 __CLASS__
111 );
112 }
113}
An exception for terminatinating execution or to throw for unit testing.