Lines Matching refs:text
88 * @param string $text Mustache template source to tokenize
93 public function scan($text, $delimiters = null)
95 if ($text instanceof HandlebarsString) {
96 $text = $text->getString();
112 $len = strlen($text);
116 $character = $text[$i];
121 if ($character === $firstOpeningTagCharacter && $this->tagChange($this->otag, $text, $i, $openingTagLength)
138 if (isset($this->tagTypes[$text[$i + 1]])) {
139 $tag = $text[$i + 1];
147 $i = $this->changeDelimiters($text, $i);
164 if ($character === $firstClosingTagCharacter && $this->tagChange($this->ctag, $text, $i, $closingTagLength)) {
317 * @param string $text Mustache template source
322 protected function changeDelimiters($text, $index)
324 $startIndex = strpos($text, '=', $index) + 1;
326 $closeIndex = strpos($text, $close, $index);
330 trim(substr($text, $startIndex, $closeIndex - $startIndex))
342 * @param string $text Mustache template source
348 protected function tagChange($tag, $text, $index, $tagLength)
350 return substr($text, $index, $tagLength) === $tag;