1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace UCD\Unicode\Character; |
4
|
|
|
|
5
|
|
|
|
6
|
|
|
use UCD\Unicode\Character\Properties\Bidirectionality; |
7
|
|
|
use UCD\Unicode\Character\Properties\LetterCase; |
8
|
|
|
use UCD\Unicode\Character\Properties\General; |
9
|
|
|
use UCD\Unicode\Character\Properties\Normalization; |
10
|
|
|
use UCD\Unicode\Character\Properties\Numericity; |
11
|
|
|
use UCD\Unicode\Character\Properties\Shaping; |
12
|
|
|
|
13
|
|
|
class Properties |
14
|
|
|
{ |
15
|
|
|
/** |
16
|
|
|
* @var General |
17
|
|
|
*/ |
18
|
|
|
private $general; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* @var LetterCase |
22
|
|
|
*/ |
23
|
|
|
private $letterCase; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* @var Numericity |
27
|
|
|
*/ |
28
|
|
|
private $numericity; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @var Normalization |
32
|
|
|
*/ |
33
|
|
|
private $normalization; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @var Bidirectionality |
37
|
|
|
*/ |
38
|
|
|
private $bidirectionality; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @var Shaping |
42
|
|
|
*/ |
43
|
|
|
private $shaping; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @param General $general |
47
|
|
|
* @param LetterCase $letterCase |
48
|
|
|
* @param Numericity $numericity |
49
|
|
|
* @param Normalization $normalization |
50
|
|
|
* @param Bidirectionality $bidirectionality |
51
|
|
|
* @param Shaping $shaping |
52
|
|
|
*/ |
53
|
|
|
public function __construct( |
54
|
|
|
General $general, |
55
|
|
|
LetterCase $letterCase, |
56
|
|
|
Numericity $numericity, |
57
|
|
|
Normalization $normalization, |
58
|
|
|
Bidirectionality $bidirectionality, |
59
|
|
|
Shaping $shaping |
60
|
|
|
) { |
61
|
|
|
$this->general = $general; |
62
|
|
|
$this->letterCase = $letterCase; |
63
|
|
|
$this->numericity = $numericity; |
64
|
|
|
$this->normalization = $normalization; |
65
|
|
|
$this->bidirectionality = $bidirectionality; |
66
|
|
|
$this->shaping = $shaping; |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* @return General |
71
|
|
|
*/ |
72
|
|
|
public function getGeneral() |
73
|
|
|
{ |
74
|
|
|
return $this->general; |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @return LetterCase |
79
|
|
|
*/ |
80
|
|
|
public function getLetterCase() |
81
|
|
|
{ |
82
|
|
|
return $this->letterCase; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @return Numericity |
87
|
|
|
*/ |
88
|
|
|
public function getNumericity() |
89
|
|
|
{ |
90
|
|
|
return $this->numericity; |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* @return bool |
95
|
|
|
*/ |
96
|
|
|
public function isNumeric() |
97
|
|
|
{ |
98
|
|
|
return $this->numericity instanceof Numericity\Numeric; |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @return Normalization |
103
|
|
|
*/ |
104
|
|
|
public function getNormalization() |
105
|
|
|
{ |
106
|
|
|
return $this->normalization; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* @return Bidirectionality |
111
|
|
|
*/ |
112
|
|
|
public function getBidirectionality() |
113
|
|
|
{ |
114
|
|
|
return $this->bidirectionality; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* @return Shaping |
119
|
|
|
*/ |
120
|
|
|
public function getShaping() |
121
|
|
|
{ |
122
|
|
|
return $this->shaping; |
123
|
|
|
} |
124
|
|
|
} |