public function getTokens($string)
    {
        $tokens      = [];
        $scanResults = $this->engine->getTokenizer()->scan($string);

        foreach ($scanResults as $scanResult) {
            if (
                isset($scanResult['type'])
                && isset($scanResult['name'])
                && \Mustache_Tokenizer::T_ESCAPED === $scanResult['type']
            ) {
                $tokens[$scanResult['name']] = true;
            }
        }

        return array_keys($tokens);
    }
public function getTokens($string)
    {
        $tokens      = [];
        $scanResults = $this->engine->getTokenizer()->scan($string);

        foreach ($scanResults as $scanResult) {
            if (
                isset($scanResult['type'])
                && isset($scanResult['name'])
                && \Mustache_Tokenizer::T_ESCAPED === $scanResult['type']
            ) {
                $tokens[$scanResult['name']] = true;
            }
        }

        return array_keys($tokens);
    }
public function getTokens ( $ string ) { $ tokens = [ ] ; $ scanResults = $ this -> engine -> getTokenizer ( ) -> scan ( $ string ) ; foreach ( $ scanResults as $ scanResult ) { if ( isset ( $ scanResult [ 'type' ] ) && isset ( $ scanResult [ 'name' ] ) && \ Mustache_Tokenizer :: T_ESCAPED === $ scanResult [ 'type' ] ) { $ tokens [ $ scanResult [ 'name' ] ] = true ; } } return array_keys ( $ tokens ) ; }
Scan a string for tokens using the same engine.

@param $string

@return array a unique list of all the raw mustache tags found in the string
Scan a string for tokens using the same engine .