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 / RichText / Run.php

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

66 lines 1.1 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\RichText;
4
5 use PhpOffice\PhpSpreadsheet\Style\Font;
6
7 class Run extends TextElement implements ITextElement
8 {
9 /**
10 * Font.
11 *
12 * @var ?Font
13 */
14 private $font;
15
16 /**
17 * Create a new Run instance.
18 *
19 * @param string $text Text
20 */
21 public function __construct($text = '')
22 {
23 parent::__construct($text);
24 // Initialise variables
25 $this->font = new Font();
26 }
27
28 /**
29 * Get font.
30 *
31 * @return null|\PhpOffice\PhpSpreadsheet\Style\Font
32 */
33 public function getFont()
34 {
35 return $this->font;
36 }
37
38 /**
39 * Set font.
40 *
41 * @param Font $font Font
42 *
43 * @return $this
44 */
45 public function setFont(?Font $font = null)
46 {
47 $this->font = $font;
48
49 return $this;
50 }
51
52 /**
53 * Get hash code.
54 *
55 * @return string Hash code
56 */
57 public function getHashCode()
58 {
59 return md5(
60 $this->getText() .
61 (($this->font === null) ? '' : $this->font->getHashCode()) .
62 __CLASS__
63 );
64 }
65 }
66