1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* This file is part of PHPPresentation - A pure PHP library for reading and writing |
4
|
|
|
* presentations documents. |
5
|
|
|
* |
6
|
|
|
* PHPPresentation is free software distributed under the terms of the GNU Lesser |
7
|
|
|
* General Public License version 3 as published by the Free Software Foundation. |
8
|
|
|
* |
9
|
|
|
* For the full copyright and license information, please read the LICENSE |
10
|
|
|
* file that was distributed with this source code. For the full list of |
11
|
|
|
* contributors, visit https://github.com/PHPOffice/PHPPresentation/contributors. |
12
|
|
|
* |
13
|
|
|
* @link https://github.com/PHPOffice/PHPPresentation |
14
|
|
|
* @copyright 2009-2015 PHPPresentation contributors |
15
|
|
|
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 |
16
|
|
|
*/ |
17
|
|
|
|
18
|
|
|
namespace PhpOffice\PhpPresentation\Shape\Chart; |
19
|
|
|
|
20
|
|
|
use PhpOffice\PhpPresentation\Style\Fill; |
21
|
|
|
use PhpOffice\PhpPresentation\Style\Border; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* \PhpOffice\PhpPresentation\Shape\Chart\Axis |
25
|
|
|
*/ |
26
|
|
|
class Marker |
27
|
|
|
{ |
28
|
|
|
const SYMBOL_CIRCLE = 'circle'; |
29
|
|
|
const SYMBOL_DASH = 'dash'; |
30
|
|
|
const SYMBOL_DIAMOND = 'diamond'; |
31
|
|
|
const SYMBOL_DOT = 'dot'; |
32
|
|
|
const SYMBOL_NONE = 'none'; |
33
|
|
|
const SYMBOL_PLUS = 'plus'; |
34
|
|
|
const SYMBOL_SQUARE = 'square'; |
35
|
|
|
const SYMBOL_STAR = 'star'; |
36
|
|
|
const SYMBOL_TRIANGLE = 'triangle'; |
37
|
|
|
const SYMBOL_X = 'x'; |
38
|
|
|
|
39
|
|
|
public static $arraySymbol = array( |
40
|
|
|
self::SYMBOL_CIRCLE, |
41
|
|
|
self::SYMBOL_DASH, |
42
|
|
|
self::SYMBOL_DIAMOND, |
43
|
|
|
self::SYMBOL_DOT, |
44
|
|
|
self::SYMBOL_NONE, |
45
|
|
|
self::SYMBOL_PLUS, |
46
|
|
|
self::SYMBOL_SQUARE, |
47
|
|
|
self::SYMBOL_STAR, |
48
|
|
|
self::SYMBOL_TRIANGLE, |
49
|
|
|
self::SYMBOL_X |
50
|
|
|
); |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @var string |
54
|
|
|
*/ |
55
|
|
|
protected $symbol = self::SYMBOL_NONE; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @var int |
59
|
|
|
*/ |
60
|
|
|
protected $size = 5; |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @var PhpOffice\PhpPresentation\Style\Fill |
64
|
|
|
*/ |
65
|
|
|
protected $fill; |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @var PhpOffice\PhpPresentation\Style\Border |
69
|
|
|
*/ |
70
|
|
|
protected $border; |
71
|
|
|
|
72
|
101 |
|
public function __construct(){ |
73
|
101 |
|
$this->fill = new Fill(); |
|
|
|
|
74
|
101 |
|
$this->border = new Border(); |
|
|
|
|
75
|
|
|
|
76
|
101 |
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @return string |
80
|
|
|
*/ |
81
|
27 |
|
public function getSymbol() |
82
|
|
|
{ |
83
|
27 |
|
return $this->symbol; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @param string $symbol |
88
|
|
|
* @return $this |
89
|
|
|
*/ |
90
|
5 |
|
public function setSymbol($symbol = self::SYMBOL_NONE) |
91
|
|
|
{ |
92
|
5 |
|
$this->symbol = $symbol; |
93
|
5 |
|
return $this; |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* @return int |
98
|
|
|
*/ |
99
|
6 |
|
public function getSize() |
100
|
|
|
{ |
101
|
6 |
|
return $this->size; |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* @param int $size |
106
|
|
|
* @return $this |
107
|
|
|
*/ |
108
|
5 |
|
public function setSize($size = 5) |
109
|
|
|
{ |
110
|
5 |
|
$this->size = $size; |
111
|
5 |
|
return $this; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @return PhpOffice\PhpPresentation\Style\Fill |
116
|
|
|
*/ |
117
|
16 |
|
public function getFill() |
118
|
|
|
{ |
119
|
16 |
|
return $this->fill; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* @param PhpOffice\PhpPresentation\Style\Fill |
124
|
|
|
* @return $this |
125
|
|
|
*/ |
126
|
|
|
public function setFill(Fill $fill) |
127
|
|
|
{ |
128
|
|
|
$this->fill = $fill; |
|
|
|
|
129
|
|
|
return $this; |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
/** |
133
|
|
|
* @return PhpOffice\PhpPresentation\Style\Border |
134
|
|
|
*/ |
135
|
16 |
|
public function getBorder() |
136
|
|
|
{ |
137
|
16 |
|
return $this->border; |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
/** |
141
|
|
|
* @param PhpOffice\PhpPresentation\Style\Border |
142
|
|
|
* @return $this |
143
|
|
|
*/ |
144
|
|
|
public function setBorder(Border $border) |
145
|
|
|
{ |
146
|
|
|
$this->border = $border; |
|
|
|
|
147
|
|
|
return $this; |
148
|
|
|
} |
149
|
|
|
} |
150
|
|
|
|
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..