1 | <?php |
||
49 | class Token |
||
50 | { |
||
51 | /** |
||
52 | * The content of the token. |
||
53 | * |
||
54 | * @var string $content |
||
55 | */ |
||
56 | protected $content = ''; |
||
57 | |||
58 | /** |
||
59 | * The filtered content of the token. |
||
60 | * |
||
61 | * @var string $filteredContent |
||
62 | */ |
||
63 | protected $filteredContent = ''; |
||
64 | |||
65 | /** |
||
66 | * The hyphenated token. |
||
67 | * |
||
68 | * @var array $hyphenatedContent |
||
69 | */ |
||
70 | protected $hyphenatedContent = array(); |
||
71 | |||
72 | /** |
||
73 | * The hyphenation patterns for this token. |
||
74 | * |
||
75 | * @var array $pattern |
||
76 | */ |
||
77 | protected $pattern = array(); |
||
78 | |||
79 | /** |
||
80 | * Create the Token |
||
81 | * |
||
82 | * @param string $content The content to be stored in the token. |
||
83 | */ |
||
84 | public function __construct($content) |
||
89 | |||
90 | /** |
||
91 | * Get the tokens content |
||
92 | * |
||
93 | * @return string |
||
94 | */ |
||
95 | public function get() |
||
99 | |||
100 | /** |
||
101 | * Set the tokens hyphenated content |
||
102 | * |
||
103 | * @param array $hyphenatedContent all possible hyphenations |
||
104 | * |
||
105 | * @return Token |
||
106 | */ |
||
107 | public function setHyphenatedContent(array $hyphenatedContent) |
||
113 | |||
114 | /** |
||
115 | * Get the hyphenated content |
||
116 | * |
||
117 | * @return array |
||
118 | */ |
||
119 | public function getHyphenatedContent() |
||
123 | |||
124 | /** |
||
125 | * Get the type of this token |
||
126 | * |
||
127 | * @return string |
||
128 | */ |
||
129 | public function getType() |
||
133 | |||
134 | /** |
||
135 | * Get the already filtered content of the token. |
||
136 | * |
||
137 | * @return string |
||
138 | */ |
||
139 | public function getFilteredContent() |
||
147 | |||
148 | /** |
||
149 | * Set the filtered content |
||
150 | * |
||
151 | * @param string $content The Filtered Content |
||
152 | * |
||
153 | * @return Token |
||
154 | */ |
||
155 | public function setFilteredContent($content) |
||
161 | |||
162 | /** |
||
163 | * Get the length of the contained (unhyphenated) token |
||
164 | * |
||
165 | * @return int |
||
166 | */ |
||
167 | public function length() |
||
171 | } |
||
172 |