public function generate($till = self :: UNTIL_FRAGMENT) {

		$url = null !== $this -> getScheme() ? $this -> getScheme() . '://' : '';

		if($till !== self :: UNTIL_SCHEME) {
			
			$url .= null !== $this -> getUser() ? $this -> getUser() . ':' : '';

			if($till !== self :: UNTIL_USER) {

				$url .= null !== $this -> getUser() ? $this -> getPassword() . '@' : '';
				
				if($till !== self :: UNTIL_PASSWORD) {

					$url .= $this -> getHost();

					if($till !== self :: UNTIL_HOST) {
						
						$url .= null !== $this -> getPath() ? $this -> getPath() : '/';

						if($till !== self :: UNTIL_PATH) {
							
							$url .= null !== $this -> getQuery() ? '?' . $this -> getQuery() : '';

							if($till !== self :: UNTIL_QUERY) {
								$url .= '#' . $this -> getFragment();						
							}
						}
					}
				}
			}
		}

		return $url;
	}