Lines Matching refs:text
90 * @param string $text Mustache template source to tokenize
95 public function scan($text, $delimiters = null) argument
114 $len = strlen($text);
118 $char = $text[$i];
120 … if ($char === $this->otagChar && substr($text, $i, $this->otagLen) === $this->otag) {
135 $char = $text[$i + 1];
145 $i = $this->changeDelimiters($text, $i);
148 $i = $this->addPragma($text, $i);
160 $char = $text[$i];
162 … if ($char === $this->ctagChar && substr($text, $i, $this->ctagLen) === $this->ctag) {
175 if (($i + 2 < $len) && $text[$i + 2] === '}') {
266 * @param string $text Mustache template source
271 private function changeDelimiters($text, $index) argument
273 $startIndex = strpos($text, '=', $index) + 1;
275 $closeIndex = strpos($text, $close, $index);
283 $this->setDelimiters(trim(substr($text, $startIndex, $closeIndex - $startIndex)));
323 * @param string $text
328 private function addPragma($text, $index) argument
330 $end = strpos($text, $this->ctag, $index);
331 $pragma = trim(substr($text, $index + 2, $end - $index - 2));