[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * PHPExcel_Cell_Hyperlink 5 * 6 * Copyright (c) 2006 - 2015 PHPExcel 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Lesser General Public 10 * License as published by the Free Software Foundation; either 11 * version 2.1 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public 19 * License along with this library; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 * 22 * @category PHPExcel 23 * @package PHPExcel_Cell 24 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) 25 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 26 * @version ##VERSION##, ##DATE## 27 */ 28 class PHPExcel_Cell_Hyperlink 29 { 30 /** 31 * URL to link the cell to 32 * 33 * @var string 34 */ 35 private $url; 36 37 /** 38 * Tooltip to display on the hyperlink 39 * 40 * @var string 41 */ 42 private $tooltip; 43 44 /** 45 * Create a new PHPExcel_Cell_Hyperlink 46 * 47 * @param string $pUrl Url to link the cell to 48 * @param string $pTooltip Tooltip to display on the hyperlink 49 */ 50 public function __construct($pUrl = '', $pTooltip = '') 51 { 52 // Initialise member variables 53 $this->url = $pUrl; 54 $this->tooltip = $pTooltip; 55 } 56 57 /** 58 * Get URL 59 * 60 * @return string 61 */ 62 public function getUrl() 63 { 64 return $this->url; 65 } 66 67 /** 68 * Set URL 69 * 70 * @param string $value 71 * @return PHPExcel_Cell_Hyperlink 72 */ 73 public function setUrl($value = '') 74 { 75 $this->url = $value; 76 return $this; 77 } 78 79 /** 80 * Get tooltip 81 * 82 * @return string 83 */ 84 public function getTooltip() 85 { 86 return $this->tooltip; 87 } 88 89 /** 90 * Set tooltip 91 * 92 * @param string $value 93 * @return PHPExcel_Cell_Hyperlink 94 */ 95 public function setTooltip($value = '') 96 { 97 $this->tooltip = $value; 98 return $this; 99 } 100 101 /** 102 * Is this hyperlink internal? (to another worksheet) 103 * 104 * @return boolean 105 */ 106 public function isInternal() 107 { 108 return strpos($this->url, 'sheet://') !== false; 109 } 110 111 /** 112 * Get hash code 113 * 114 * @return string Hash code 115 */ 116 public function getHashCode() 117 { 118 return md5( 119 $this->url . 120 $this->tooltip . 121 __CLASS__ 122 ); 123 } 124 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |