public function valid() { // Return true if and only if all parts of the URI have passed validation
return $this->
validateUsername() and $this->
validatePassword() and $this->
validateHost() and $this->
validatePort() and $this->
validatePath() and $this->
validateQuery() and $this->
validateFragment();
} /**
* Returns the username portion of the URL, or FALSE if none.
*
* @return string
*/
public function getUsername() { return strlen($this->_username
) > 0 ?
$this->_username : false;
}