To manipulate an existing URI, pass the entire URI
to Zend_Uri::factory().
Example 966. Manipulating an Existing URI with Zend_Uri::factory()
<?php
// To manipulate an existing URI, pass it in.
$uri = Zend_Uri::factory('http://www.zend.com');
// $uri instanceof Zend_Uri_Http
The URI will be parsed and validated. If it is found to be invalid,
a Zend_Uri_Exception will be thrown immediately. Otherwise,
Zend_Uri::factory() will return a subclass of itself that
specializes in the scheme to be manipulated.




