lib/classes/Swift/Mime/Headers/AbstractHeader.php
protected function getEncodableWordTokens($string)
    {
        $tokens = [];

        $encodedToken = '';
        // Split at all whitespace boundaries
        foreach (preg_split('~(?=[\t ])~', $string) as $token) {
            if ($this->tokenNeedsEncoding($token)) {
                $encodedToken .= $token;
            } else {
                if (strlen($encodedToken) > 0) {
                    $tokens[] = $encodedToken;
                    $encodedToken = '';
                }
                $tokens[] = $token;
            }
        }
        if (strlen($encodedToken)) {
            $tokens[] = $encodedToken;
        }

        return $tokens;
    }
protected function getEncodableWordTokens($string)
    {
        $tokens = [];

        $encodedToken = '';
        // Split at all whitespace boundaries
        foreach (preg_split('~(?=[\t ])~', $string) as $token) {
            if ($this->tokenNeedsEncoding($token)) {
                $encodedToken .= $token;
            } else {
                if (strlen($encodedToken) > 0) {
                    $tokens[] = $encodedToken;
                    $encodedToken = '';
                }
                $tokens[] = $token;
            }
        }
        if (strlen($encodedToken)) {
            $tokens[] = $encodedToken;
        }

        return $tokens;
    }
protected function getEncodableWordTokens ( $ string ) { $ tokens = [ ] ; $ encodedToken = '' ; // Split at all whitespace boundaries foreach ( preg_split ( '~(?=[\t ])~' , $ string ) as $ token ) { if ( $ this -> tokenNeedsEncoding ( $ token ) ) { $ encodedToken .= $ token ; } else { if ( strlen ( $ encodedToken ) > 0 ) { $ tokens [ ] = $ encodedToken ; $ encodedToken = '' ; } $ tokens [ ] = $ token ; } } if ( strlen ( $ encodedToken ) ) { $ tokens [ ] = $ encodedToken ; } return $ tokens ; }
Splits a string into tokens in blocks of words which can be encoded quickly.

@param string $string

@return string[]
Splits a string into tokens in blocks of words which can be encoded quickly .