ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PhpOffice\PhpSpreadsheet\Cell\Hyperlink Class Reference
+ Collaboration diagram for PhpOffice\PhpSpreadsheet\Cell\Hyperlink:

Public Member Functions

 __construct ($pUrl='', $pTooltip='')
 Create a new Hyperlink. More...
 
 getUrl ()
 Get URL. More...
 
 setUrl ($value)
 Set URL. More...
 
 getTooltip ()
 Get tooltip. More...
 
 setTooltip ($value)
 Set tooltip. More...
 
 isInternal ()
 Is this hyperlink internal? (to another worksheet). More...
 
 getTypeHyperlink ()
 
 getHashCode ()
 Get hash code. More...
 

Private Attributes

 $url
 
 $tooltip
 

Detailed Description

Definition at line 5 of file Hyperlink.php.

Constructor & Destructor Documentation

◆ __construct()

PhpOffice\PhpSpreadsheet\Cell\Hyperlink::__construct (   $pUrl = '',
  $pTooltip = '' 
)

Create a new Hyperlink.

Parameters
string$pUrlUrl to link the cell to
string$pTooltipTooltip to display on the hyperlink

Definition at line 27 of file Hyperlink.php.

28  {
29  // Initialise member variables
30  $this->url = $pUrl;
31  $this->tooltip = $pTooltip;
32  }

Member Function Documentation

◆ getHashCode()

PhpOffice\PhpSpreadsheet\Cell\Hyperlink::getHashCode ( )

Get hash code.

Returns
string Hash code

Definition at line 105 of file Hyperlink.php.

106  {
107  return md5(
108  $this->url .
109  $this->tooltip .
110  __CLASS__
111  );
112  }

◆ getTooltip()

PhpOffice\PhpSpreadsheet\Cell\Hyperlink::getTooltip ( )

Get tooltip.

Returns
string

Definition at line 63 of file Hyperlink.php.

References PhpOffice\PhpSpreadsheet\Cell\Hyperlink\$tooltip.

◆ getTypeHyperlink()

PhpOffice\PhpSpreadsheet\Cell\Hyperlink::getTypeHyperlink ( )
Returns
string

Definition at line 95 of file Hyperlink.php.

References PhpOffice\PhpSpreadsheet\Cell\Hyperlink\isInternal().

96  {
97  return $this->isInternal() ? '' : 'External';
98  }
+ Here is the call graph for this function:

◆ getUrl()

PhpOffice\PhpSpreadsheet\Cell\Hyperlink::getUrl ( )

Get URL.

Returns
string

Definition at line 39 of file Hyperlink.php.

References PhpOffice\PhpSpreadsheet\Cell\Hyperlink\$url.

◆ isInternal()

PhpOffice\PhpSpreadsheet\Cell\Hyperlink::isInternal ( )

Is this hyperlink internal? (to another worksheet).

Returns
bool

Definition at line 87 of file Hyperlink.php.

Referenced by PhpOffice\PhpSpreadsheet\Cell\Hyperlink\getTypeHyperlink().

88  {
89  return strpos($this->url, 'sheet://') !== false;
90  }
+ Here is the caller graph for this function:

◆ setTooltip()

PhpOffice\PhpSpreadsheet\Cell\Hyperlink::setTooltip (   $value)

Set tooltip.

Parameters
string$value
Returns
$this

Definition at line 75 of file Hyperlink.php.

76  {
77  $this->tooltip = $value;
78 
79  return $this;
80  }

◆ setUrl()

PhpOffice\PhpSpreadsheet\Cell\Hyperlink::setUrl (   $value)

Set URL.

Parameters
string$value
Returns
$this

Definition at line 51 of file Hyperlink.php.

52  {
53  $this->url = $value;
54 
55  return $this;
56  }

Field Documentation

◆ $tooltip

PhpOffice\PhpSpreadsheet\Cell\Hyperlink::$tooltip
private

Definition at line 19 of file Hyperlink.php.

Referenced by PhpOffice\PhpSpreadsheet\Cell\Hyperlink\getTooltip().

◆ $url

PhpOffice\PhpSpreadsheet\Cell\Hyperlink::$url
private

Definition at line 12 of file Hyperlink.php.

Referenced by PhpOffice\PhpSpreadsheet\Cell\Hyperlink\getUrl().


The documentation for this class was generated from the following file: