public static function setTrustedHosts(array $hostPatterns) {

		self::$trustedHostPatterns = array_map(function ($hostPattern) {
			return sprintf('#%s#i', $hostPattern);
		}, $hostPatterns);

		self::$trustedHosts = [];

	}
public static function setTrustedHosts(array $hostPatterns) {

		self::$trustedHostPatterns = array_map(function ($hostPattern) {
			return sprintf('#%s#i', $hostPattern);
		}, $hostPatterns);

		self::$trustedHosts = [];

	}
public static function setTrustedHosts ( array $ hostPatterns ) { self :: $ trustedHostPatterns = array_map ( function ( $ hostPattern ) { return sprintf ( '#%s#i' , $ hostPattern ) ; } , $ hostPatterns ) ; self :: $ trustedHosts = [ ] ; }
Sets a list of trusted host patterns.
You should only list the hosts you manage using regexs.

@param array $hostPatterns A list of trusted host patterns
Sets a list of trusted host patterns . You should only list the hosts you manage using regexs .