Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Manipulating an Existing URI

To manipulate an existing URI, pass the entire URI to Zend_Uri::factory().

Example 985. Manipulating an Existing URI with Zend_Uri::factory()

// To manipulate an existing URI, pass it in.
$uri Zend_Uri::factory('');

// $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.

Zend Framework