src/Router.php
private function config_host(string $host=null) {
		if (filter_var($host, FILTER_VALIDATE_URL,
				FILTER_FLAG_PATH_REQUIRED) === false)
			return;
		$host = rtrim($host, '/') . '/';
		$home = $this->home;
		if ($home == '/') {
			$this->host = $host;
			return;
		}
		# home must be at the end of host
		if (substr($host, -strlen($home)) != $home)
			return;
		$this->host = $host;
	}
private function config_host(string $host=null) {
		if (filter_var($host, FILTER_VALIDATE_URL,
				FILTER_FLAG_PATH_REQUIRED) === false)
			return;
		$host = rtrim($host, '/') . '/';
		$home = $this->home;
		if ($home == '/') {
			$this->host = $host;
			return;
		}
		# home must be at the end of host
		if (substr($host, -strlen($home)) != $home)
			return;
		$this->host = $host;
	}
private function config_host ( string $ host = null ) { if ( filter_var ( $ host , FILTER_VALIDATE_URL , FILTER_FLAG_PATH_REQUIRED ) === false ) return ; $ host = rtrim ( $ host , '/' ) . '/' ; $ home = $ this -> home ; if ( $ home == '/' ) { $ this -> host = $ host ; return ; } # home must be at the end of host if ( substr ( $ host , - strlen ( $ home ) ) != $ home ) return ; $ this -> host = $ host ; }
Host configuration validation.
Host configuration validation .