public function get_hyphenator( Settings $settings ) {
		$lang       = $settings['hyphenLanguage'];
		$exceptions = (array) $settings['hyphenationCustomExceptions'];
		$hyphenator = $this->cache->get_hyphenator( $lang );

		if ( null === $hyphenator ) {
			$hyphenator = new Hyphenator( $lang, $exceptions );
			$this->cache->set_hyphenator( $lang, $hyphenator );
		} else {
			$hyphenator->set_language( $lang ); // just for insurance.
			$hyphenator->set_custom_exceptions( $exceptions );
		}

		return $hyphenator;
	}
public function get_hyphenator( Settings $settings ) {
		$lang       = $settings['hyphenLanguage'];
		$exceptions = (array) $settings['hyphenationCustomExceptions'];
		$hyphenator = $this->cache->get_hyphenator( $lang );

		if ( null === $hyphenator ) {
			$hyphenator = new Hyphenator( $lang, $exceptions );
			$this->cache->set_hyphenator( $lang, $hyphenator );
		} else {
			$hyphenator->set_language( $lang ); // just for insurance.
			$hyphenator->set_custom_exceptions( $exceptions );
		}

		return $hyphenator;
	}
public function get_hyphenator ( Settings $ settings ) { $ lang = $ settings [ 'hyphenLanguage' ] ; $ exceptions = ( array ) $ settings [ 'hyphenationCustomExceptions' ] ; $ hyphenator = $ this -> cache -> get_hyphenator ( $ lang ) ; if ( null === $ hyphenator ) { $ hyphenator = new Hyphenator ( $ lang , $ exceptions ) ; $ this -> cache -> set_hyphenator ( $ lang , $ hyphenator ) ; } else { $ hyphenator -> set_language ( $ lang ) ; // just for insurance. $ hyphenator -> set_custom_exceptions ( $ exceptions ) ; } return $ hyphenator ; }
Retrieves the hyphenator instance.

@param Settings $settings The settings to apply.

@return Hyphenator
Retrieves the hyphenator instance .