Every instance of a Zend_Uri subclass (e.g.
Zend_Uri_Http) has several instance methods that are useful for
working with any kind of URI.
The scheme of the URI is the part of the URI
that precedes the colon. For example, the scheme of
http://www.zend.com is 'http'.
Example 969. Getting the Scheme from a Zend_Uri_* Object
<?php
$uri = Zend_Uri::factory('http://www.zend.com');
$scheme = $uri->getScheme(); // "http"
The getScheme() instance method returns only the scheme
part of the URI object.
Example 970. Getting the Entire URI from a Zend_Uri_* Object
<?php
$uri = Zend_Uri::factory('http://www.zend.com');
echo $uri->getUri(); // "http://www.zend.com"
The getUri() method returns the string representation
of the entire URI.
Zend_Uri::factory() will always validate any
URI passed to it and will not instantiate a new
Zend_Uri subclass if the given URI is
found to be invalid. However, after the Zend_Uri subclass is
instantiated for a new URI or an existing valid one, it is
possible that the URI can later become invalid after it
is manipulated.
Example 971. Validating a Zend_Uri_* Object
<?php
$uri = Zend_Uri::factory('http://www.zend.com');
$isValid = $uri->valid(); // TRUE
The valid() instance method provides a means to check that
the URI object is still valid.




