public function hyphenate( array $parsed_text_tokens, $hyphen = '-', $hyphenate_title_case = false, $min_length = 2, $min_before = 2, $min_after = 2 ) {
		if ( empty( $min_length ) || empty( $min_before ) || ! isset( $this->pattern_trie ) || ! isset( $this->pattern_exceptions ) ) {
			return $parsed_text_tokens;
		}

		// Make sure we have full exceptions list.
		if ( ! isset( $this->merged_exception_patterns ) ) {
			$this->merge_hyphenation_exceptions();
		}

		foreach ( $parsed_text_tokens as $key => $text_token ) {
			$parsed_text_tokens[ $key ] = $text_token->with_value( $this->hyphenate_word( $text_token->value, $hyphen, $hyphenate_title_case, $min_length, $min_before, $min_after ) );
		}

		return $parsed_text_tokens;
	}
public function hyphenate( array $parsed_text_tokens, $hyphen = '-', $hyphenate_title_case = false, $min_length = 2, $min_before = 2, $min_after = 2 ) {
		if ( empty( $min_length ) || empty( $min_before ) || ! isset( $this->pattern_trie ) || ! isset( $this->pattern_exceptions ) ) {
			return $parsed_text_tokens;
		}

		// Make sure we have full exceptions list.
		if ( ! isset( $this->merged_exception_patterns ) ) {
			$this->merge_hyphenation_exceptions();
		}

		foreach ( $parsed_text_tokens as $key => $text_token ) {
			$parsed_text_tokens[ $key ] = $text_token->with_value( $this->hyphenate_word( $text_token->value, $hyphen, $hyphenate_title_case, $min_length, $min_before, $min_after ) );
		}

		return $parsed_text_tokens;
	}
public function hyphenate ( array $ parsed_text_tokens , $ hyphen = '-' , $ hyphenate_title_case = false , $ min_length = 2 , $ min_before = 2 , $ min_after = 2 ) { if ( empty ( $ min_length ) || empty ( $ min_before ) || ! isset ( $ this -> pattern_trie ) || ! isset ( $ this -> pattern_exceptions ) ) { return $ parsed_text_tokens ; } // Make sure we have full exceptions list. if ( ! isset ( $ this -> merged_exception_patterns ) ) { $ this -> merge_hyphenation_exceptions ( ) ; } foreach ( $ parsed_text_tokens as $ key => $ text_token ) { $ parsed_text_tokens [ $ key ] = $ text_token -> with_value ( $ this -> hyphenate_word ( $ text_token -> value , $ hyphen , $ hyphenate_title_case , $ min_length , $ min_before , $ min_after ) ) ; } return $ parsed_text_tokens ; }
Hyphenates parsed text tokens.

@param array  $parsed_text_tokens   An array of text tokens.
@param string $hyphen               Optional. The hyphen character. Default '-'.
@param bool   $hyphenate_title_case Optional. Whether words in Title Case should be hyphenated. Default false.
@param int    $min_length           Optional. Minimum word length for hyphenation. Default 2.
@param int    $min_before           Optional. Minimum number of characters before a hyphenation point. Default 2.
@param int    $min_after            Optional. Minimum number of characters after a hyphenation point. Default 2.

@return Token[] The modified text tokens.
Hyphenates parsed text tokens .