Lines Matching refs:this

99         $this->reset();
103 $this->otag = $otag;
104 $this->ctag = $ctag;
107 $openingTagLength = strlen($this->otag);
108 $closingTagLength = strlen($this->ctag);
109 $firstOpeningTagCharacter = $this->otag[0];
110 $firstClosingTagCharacter = $this->ctag[0];
118 switch ($this->state) {
121 if ($character === $firstOpeningTagCharacter && $this->tagChange($this->otag, $text, $i, $openingTagLength)
124 $this->flushBuffer();
125 $this->state = self::IN_TAG_TYPE;
128 $this->filterLine();
130 $this->buffer .= $character;
138 if (isset($this->tagTypes[$text[$i + 1]])) {
140 $this->tagType = $tag;
143 $this->tagType = self::T_ESCAPED;
146 if ($this->tagType === self::T_DELIM_CHANGE) {
147 $i = $this->changeDelimiters($text, $i);
148 $openingTagLength = strlen($this->otag);
149 $closingTagLength = strlen($this->ctag);
150 $firstOpeningTagCharacter = $this->otag[0];
151 $firstClosingTagCharacter = $this->ctag[0];
153 $this->state = self::IN_TEXT;
158 $this->state = self::IN_TAG;
160 $this->seenTag = $i;
164 if ($character === $firstClosingTagCharacter && $this->tagChange($this->ctag, $text, $i, $closingTagLength)) {
167 if (in_array($this->tagType, [
172 $newBuffer = explode(' ', trim($this->buffer), 2);
177 $this->buffer = $newBuffer[0];
180 self::TYPE => $this->tagType,
181 self::NAME => trim($this->buffer),
182 self::OTAG => $this->otag,
183 self::CTAG => $this->ctag,
184 self::INDEX => ($this->tagType == self::T_END_SECTION) ?
185 $this->seenTag - $openingTagLength :
186 $i + strlen($this->ctag),
191 $this->tokens[] = $t;
194 $this->buffer = '';
195 $i += strlen($this->ctag) - 1;
196 $this->state = self::IN_TEXT;
197 if ($this->tagType == self::T_UNESCAPED) {
198 if ($this->ctag == '}}') {
202 $lastIndex = count($this->tokens) - 1;
203 $lastName = $this->tokens[$lastIndex][self::NAME];
205 $this->tokens[$lastIndex][self::NAME] = trim(
212 $this->buffer .= $character;
219 $this->filterLine(true);
221 return $this->tokens;
231 $this->state = self::IN_TEXT;
232 $this->tagType = null;
233 $this->tag = null;
234 $this->buffer = '';
235 $this->tokens = [];
236 $this->seenTag = false;
237 $this->lineStart = 0;
238 $this->otag = '{{';
239 $this->ctag = '}}';
249 if (!empty($this->buffer)) {
250 $this->tokens[] = [
252 self::VALUE => $this->buffer
254 $this->buffer = '';
265 $tokensCount = count($this->tokens);
266 for ($j = $this->lineStart; $j < $tokensCount; $j++) {
267 $token = $this->tokens[$j];
268 if (isset($this->tagTypes[$token[self::TYPE]])) {
269 if (isset($this->interpolatedTags[$token[self::TYPE]])) {
291 $this->flushBuffer();
292 if ($this->seenTag && $this->lineIsWhitespace()) {
293 $tokensCount = count($this->tokens);
294 for ($j = $this->lineStart; $j < $tokensCount; $j++) {
295 if ($this->tokens[$j][self::TYPE] == self::T_TEXT) {
296 if (isset($this->tokens[$j + 1])
297 && $this->tokens[$j + 1][self::TYPE] == self::T_PARTIAL
299 $this->tokens[$j + 1][self::INDENT]
300 = $this->tokens[$j][self::VALUE];
303 $this->tokens[$j] = null;
307 $this->tokens[] = [self::TYPE => self::T_TEXT, self::VALUE => "\n"];
310 $this->seenTag = false;
311 $this->lineStart = count($this->tokens);
325 $close = '=' . $this->ctag;
332 $this->otag = $otag;
333 $this->ctag = $ctag;
346 * @return boolean True if this is a closing section tag