Latte\MacroTokens::fetchWords PHP Method

fetchWords() public method

Reads single tokens delimited by colon from string.
public fetchWords ( ) : array
return array
    public function fetchWords()
    {
        do {
            $words[] = $this->joinUntil(self::T_WHITESPACE, ',', ':');
        } while ($this->nextToken(':'));
        if (count($words) === 1 && ($space = $this->nextValue(self::T_WHITESPACE)) && (($dot = $this->nextValue('.')) || $this->isPrev('.'))) {
            $words[0] .= $space . $dot . $this->joinUntil(',');
        }
        $this->nextToken(',');
        $this->nextAll(self::T_WHITESPACE, self::T_COMMENT);
        return $words === [''] ? [] : $words;
    }