Http data as ZF2 class

Code
<?php

use Zend\Uri\Http;

$http = new Http('http://username:password@google.com/?q=zend');

$http->setQuery(array('q' => 'php'));

echo 
'Password: ' $http->getPassword() . PHP_EOL;
echo 
'User: ' $http->getUser() . PHP_EOL;

$http->setPassword('abcd123');
$http->setUser('admin');

if (
$http->isValid()) {
    echo 
$http PHP_EOL;
}
Result
Password: password
User: username
http://admin:abcd123@google.com/?q=php
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6