Habari\HTMLTokenSet::tokenize_replace PHP Метод

tokenize_replace() публичный Метод

Replace a full set of tokens with new tokens. The tokens are replaced in place as well as being returned
public tokenize_replace ( string $source ) : HTMLTokenSet
$source string The text to create the new set of tokens from
Результат HTMLTokenSet The new set of tokens created
    public function tokenize_replace($source)
    {
        $ht = new HTMLTokenizer($source, $this->escape);
        $this->tokens = $ht->parse()->tokens;
        return $this->tokens;
    }