Skip to content

Commit

Permalink
URI -> Uri; URL -> Url
Browse files Browse the repository at this point in the history
- Renamed all directories and filenames from URI to Uri
- Renamed all namespaces and classnames from URI to Uri
- Renamed all directories and filenames from URL to Url
- Renamed all namespaces and classnames from URL to Url
  • Loading branch information
weierophinney committed Jul 20, 2010
1 parent 1101bae commit 77dfef4
Show file tree
Hide file tree
Showing 55 changed files with 245 additions and 197 deletions.
6 changes: 3 additions & 3 deletions library/Zend/Controller/Request/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @namespace
*/
namespace Zend\Controller\Request;
use Zend\URI;
use Zend\Uri;
use Zend\Controller;

/**
Expand Down Expand Up @@ -112,8 +112,8 @@ class Http extends AbstractRequest
public function __construct($uri = null)
{
if (null !== $uri) {
if (!$uri instanceof URI\URL) {
$uri = new URI\URL($uri);
if (!$uri instanceof Uri\Url) {
$uri = new Uri\Url($uri);
}
if ($uri->isValid()) {
$path = $uri->getPath();
Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Feed/PubSubHubbub/Publisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @namespace
*/
namespace Zend\Feed\PubSubHubbub;
use Zend\URI;
use Zend\Uri;

/**
* @uses \Zend\Feed\PubSubHubbub\PubSubHubbub
Expand Down Expand Up @@ -119,7 +119,7 @@ public function setConfig($config)
*/
public function addHubUrl($url)
{
if (empty($url) || !is_string($url) || !\Zend\URI\URL::validate($url)) {
if (empty($url) || !is_string($url) || !\Zend\Uri\Url::validate($url)) {
throw new Exception('Invalid parameter "url"'
.' of "' . $url . '" must be a non-empty string and a valid'
.'URL');
Expand Down Expand Up @@ -177,7 +177,7 @@ public function getHubUrls()
*/
public function addUpdatedTopicUrl($url)
{
if (empty($url) || !is_string($url) || !\Zend\URI\URL::validate($url)) {
if (empty($url) || !is_string($url) || !\Zend\Uri\Url::validate($url)) {
throw new Exception('Invalid parameter "url"'
.' of "' . $url . '" must be a non-empty string and a valid'
.'URL');
Expand Down
8 changes: 4 additions & 4 deletions library/Zend/Feed/PubSubHubbub/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
namespace Zend\Feed\PubSubHubbub;

use Zend\URI;
use Zend\Uri;
use Zend\Date;

/**
Expand Down Expand Up @@ -214,7 +214,7 @@ public function setConfig($config)
*/
public function setTopicUrl($url)
{
if (empty($url) || !is_string($url) || !\Zend\URI\URL::validate($url)) {
if (empty($url) || !is_string($url) || !\Zend\Uri\Url::validate($url)) {
throw new Exception('Invalid parameter "url"'
.' of "' . $url . '" must be a non-empty string and a valid'
.' URL');
Expand Down Expand Up @@ -274,7 +274,7 @@ public function getLeaseSeconds()
*/
public function setCallbackUrl($url)
{
if (empty($url) || !is_string($url) || !\Zend\URI\URL::validate($url)) {
if (empty($url) || !is_string($url) || !\Zend\Uri\Url::validate($url)) {
throw new Exception('Invalid parameter "url"'
. ' of "' . $url . '" must be a non-empty string and a valid'
. ' URL');
Expand Down Expand Up @@ -340,7 +340,7 @@ public function getPreferredVerificationMode()
*/
public function addHubUrl($url)
{
if (empty($url) || !is_string($url) || !\Zend\URI\URL::validate($url)) {
if (empty($url) || !is_string($url) || !\Zend\Uri\Url::validate($url)) {
throw new Exception('Invalid parameter "url"'
. ' of "' . $url . '" must be a non-empty string and a valid'
. ' URL');
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Feed/PubSubHubbub/Subscriber/Callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function isValidHubVerification(array $httpGetData)
) {
return false;
}
if (!\Zend\URI\URL::validate($httpGetData['hub_topic'])) {
if (!\Zend\Uri\Url::validate($httpGetData['hub_topic'])) {
return false;
}

Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Feed/Reader/Extension/Atom/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
use Zend\Feed\Reader;
use Zend\Date;
use Zend\Feed\Reader\Collection;
use Zend\URI;
use Zend\Uri;

/**
* @uses DOMDocument
Expand Down Expand Up @@ -570,10 +570,10 @@ public function getSource()
*/
protected function _absolutiseUri($link)
{
if (!\Zend\URI\URL::validate($link)) {
if (!\Zend\Uri\Url::validate($link)) {
if (!is_null($this->getBaseUrl())) {
$link = $this->getBaseUrl() . $link;
if (!\Zend\URI\URL::validate($link)) {
if (!\Zend\Uri\Url::validate($link)) {
$link = null;
}
}
Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Feed/Reader/Extension/Atom/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
use Zend\Feed\Reader;
use Zend\Date;
use Zend\Feed\Reader\Collection;
use Zend\URI;
use Zend\Uri;

/**
* @uses \Zend\Date\Date
Expand Down Expand Up @@ -508,10 +508,10 @@ protected function _getAuthor(\DOMElement $element)
*/
protected function _absolutiseUri($link)
{
if (!\Zend\URI\URL::validate($link)) {
if (!\Zend\Uri\Url::validate($link)) {
if (!is_null($this->getBaseUrl())) {
$link = $this->getBaseUrl() . $link;
if (!\Zend\URI\URL::validate($link)) {
if (!\Zend\Uri\Url::validate($link)) {
$link = null;
}
}
Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Feed/Reader/FeedSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @namespace
*/
namespace Zend\Feed\Reader;
use Zend\URI;
use Zend\Uri;

/**
* @uses \Zend\Feed\Reader\Reader
Expand Down Expand Up @@ -85,9 +85,9 @@ public function addLinks(\DOMNodeList $links, $uri)
*/
protected function _absolutiseUri($link, $uri = null)
{
if (!URI\URL::validate($link)) {
if (!Uri\Url::validate($link)) {
if (!is_null($uri)) {
$uri = new URI\URL($uri);
$uri = new Uri\Url($uri);

if ($link[0] !== '/') {
$link = $uri->getPath() . '/' . $link;
Expand Down
26 changes: 13 additions & 13 deletions library/Zend/Feed/Writer/AbstractFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
namespace Zend\Feed\Writer;

use Zend\Feed;
use Zend\URI;
use Zend\Uri;
use Zend\Date;

/**
Expand Down Expand Up @@ -91,7 +91,7 @@ public function addAuthor($name, $email = null, $uri = null)
$author['email'] = $name['email'];
}
if (isset($name['uri'])) {
if (empty($name['uri']) || !is_string($name['uri']) || !\Zend\URI\URL::validate($name['uri'])) {
if (empty($name['uri']) || !is_string($name['uri']) || !\Zend\Uri\Url::validate($name['uri'])) {
throw new Feed\Exception('Invalid parameter: "uri" array value must be a non-empty string and valid URI/IRI');
}
$author['uri'] = $name['uri'];
Expand All @@ -108,7 +108,7 @@ public function addAuthor($name, $email = null, $uri = null)
$author['email'] = $email;
}
if (isset($uri)) {
if (empty($uri) || !is_string($uri) || !\Zend\URI\URL::validate($uri)) {
if (empty($uri) || !is_string($uri) || !\Zend\Uri\Url::validate($uri)) {
throw new Feed\Exception('Invalid parameter: "uri" value must be a non-empty string and valid URI/IRI');
}
$author['uri'] = $uri;
Expand Down Expand Up @@ -235,7 +235,7 @@ public function setGenerator($name, $version = null, $uri = null)
$generator['version'] = $data['version'];
}
if (isset($data['uri'])) {
if (empty($data['uri']) || !is_string($data['uri']) || !\Zend\URI\URL::validate($data['uri'])) {
if (empty($data['uri']) || !is_string($data['uri']) || !\Zend\Uri\Url::validate($data['uri'])) {
throw new \Zend\Feed\Exception('Invalid parameter: "uri" must be a non-empty string and a valid URI/IRI');
}
$generator['uri'] = $data['uri'];
Expand All @@ -252,8 +252,8 @@ public function setGenerator($name, $version = null, $uri = null)
$generator['version'] = $version;
}
if (isset($uri)) {
if (empty($uri) || !is_string($uri) || !\Zend\URI\URL::validate($uri)) {
throw new Zend_Feed_Exception('Invalid parameter: "uri" must be a non-empty string and a valid URI/IRI');
if (empty($uri) || !is_string($uri) || !\Zend\Uri\Url::validate($uri)) {
throw new \Zend\Feed\Exception('Invalid parameter: "uri" must be a non-empty string and a valid URI/IRI');
}
$generator['uri'] = $uri;
}
Expand All @@ -268,7 +268,7 @@ public function setGenerator($name, $version = null, $uri = null)
*/
public function setId($id)
{
if ((empty($id) || !is_string($id) || !\Zend\URI\URL::validate($id)) &&
if ((empty($id) || !is_string($id) || !\Zend\Uri\Url::validate($id)) &&
!preg_match('#^urn:[a-zA-Z0-9][a-zA-Z0-9\-]{1,31}:([a-zA-Z0-9\(\)\+\,\.\:\=\@\;\$\_\!\*\-]|%[0-9a-fA-F]{2})*#', $id)) {
throw new Feed\Exception('Invalid parameter: parameter must be a non-empty string and valid URI/IRI');
}
Expand All @@ -286,7 +286,7 @@ public function setId($id)
public function setImage(array $data)
{
if (empty($data['uri']) || !is_string($data['uri'])
|| !\Zend\URI\URL::validate($data['uri'])) {
|| !\Zend\Uri\Url::validate($data['uri'])) {
throw new \Zend\Feed\Exception('Invalid parameter: parameter \'uri\''
. ' must be a non-empty string and valid URI/IRI');
}
Expand All @@ -313,7 +313,7 @@ public function setLanguage($language)
*/
public function setLink($link)
{
if (empty($link) || !is_string($link) || !\Zend\URI\URL::validate($link)) {
if (empty($link) || !is_string($link) || !\Zend\Uri\Url::validate($link)) {
throw new Feed\Exception('Invalid parameter: parameter must be a non-empty string and valid URI/IRI');
}
$this->_data['link'] = $link;
Expand All @@ -326,7 +326,7 @@ public function setLink($link)
*/
public function setFeedLink($link, $type)
{
if (empty($link) || !is_string($link) || !\Zend\URI\URL::validate($link)) {
if (empty($link) || !is_string($link) || !\Zend\Uri\Url::validate($link)) {
throw new Feed\Exception('Invalid parameter: "link"" must be a non-empty string and valid URI/IRI');
}
if (!in_array(strtolower($type), array('rss', 'rdf', 'atom'))) {
Expand Down Expand Up @@ -368,7 +368,7 @@ public function setEncoding($encoding)
*/
public function setBaseUrl($url)
{
if (empty($url) || !is_string($url) || !\Zend\URI\URL::validate($url)) {
if (empty($url) || !is_string($url) || !\Zend\Uri\Url::validate($url)) {
throw new Feed\Exception('Invalid parameter: "url" array value'
. ' must be a non-empty string and valid URI/IRI');
}
Expand All @@ -382,7 +382,7 @@ public function setBaseUrl($url)
*/
public function addHub($url)
{
if (empty($url) || !is_string($url) || !\Zend\URI\URL::validate($url)) {
if (empty($url) || !is_string($url) || !\Zend\Uri\Url::validate($url)) {
throw new Feed\Exception('Invalid parameter: "url" array value'
. ' must be a non-empty string and valid URI/IRI');
}
Expand Down Expand Up @@ -419,7 +419,7 @@ public function addCategory(array $category)
if (isset($category['scheme'])) {
if (empty($category['scheme'])
|| !is_string($category['scheme'])
|| !\Zend\URI\URL::validate($category['scheme'])
|| !\Zend\Uri\Url::validate($category['scheme'])
) {
throw new Feed\Exception('The Atom scheme or RSS domain of'
. ' a category must be a valid URI');
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Feed/Writer/Deleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function setBy(array $by)
if (isset($by['uri'])) {
if (empty($by['uri'])
|| !is_string($by['uri'])
|| !\Zend\URI\URL::validate($by['uri'])
|| !\Zend\Uri\Url::validate($by['uri'])
) {
throw new FeedException('Invalid parameter: "uri" array value must be a non-empty string and valid URI/IRI');
}
Expand Down
16 changes: 8 additions & 8 deletions library/Zend/Feed/Writer/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
namespace Zend\Feed\Writer;

use Zend\Feed\Exception as FeedException;
use Zend\URI;
use Zend\Uri;
use Zend\Date;

/**
Expand Down Expand Up @@ -102,7 +102,7 @@ public function addAuthor($name, $email = null, $uri = null)
if (isset($name['uri'])) {
if (empty($name['uri'])
|| !is_string($name['uri'])
|| !\Zend\URI\URL::validate($name['uri'])
|| !\Zend\Uri\Url::validate($name['uri'])
) {
throw new FeedException('Invalid parameter: "uri" array value must be a non-empty string and valid URI/IRI');
}
Expand All @@ -124,7 +124,7 @@ public function addAuthor($name, $email = null, $uri = null)
$author['email'] = $email;
}
if (isset($uri)) {
if (empty($uri) || !is_string($uri) || !\Zend\URI\URL::validate($uri)) {
if (empty($uri) || !is_string($uri) || !\Zend\Uri\Url::validate($uri)) {
throw new FeedException('Invalid parameter: "uri" value must be a non-empty string and valid URI/IRI');
}
$author['uri'] = $uri;
Expand Down Expand Up @@ -270,7 +270,7 @@ public function setId($id)
*/
public function setLink($link)
{
if (empty($link) || !is_string($link) || !\Zend\URI\URL::validate($link)) {
if (empty($link) || !is_string($link) || !\Zend\Uri\Url::validate($link)) {
throw new FeedException('Invalid parameter: parameter must be a non-empty string and valid URI/IRI');
}
$this->_data['link'] = $link;
Expand All @@ -296,7 +296,7 @@ public function setCommentCount($count)
*/
public function setCommentLink($link)
{
if (empty($link) || !is_string($link) || !\Zend\URI\URL::validate($link)) {
if (empty($link) || !is_string($link) || !\Zend\Uri\Url::validate($link)) {
throw new FeedException('Invalid parameter: "link" must be a non-empty string and valid URI/IRI');
}
$this->_data['commentLink'] = $link;
Expand All @@ -309,7 +309,7 @@ public function setCommentLink($link)
*/
public function setCommentFeedLink(array $link)
{
if (!isset($link['uri']) || !is_string($link['uri']) || !\Zend\URI\URL::validate($link['uri'])) {
if (!isset($link['uri']) || !is_string($link['uri']) || !\Zend\Uri\Url::validate($link['uri'])) {
throw new FeedException('Invalid parameter: "link" must be a non-empty string and valid URI/IRI');
}
if (!isset($link['type']) || !in_array($link['type'], array('atom', 'rss', 'rdf'))) {
Expand Down Expand Up @@ -535,7 +535,7 @@ public function addCategory(array $category)
if (isset($category['scheme'])) {
if (empty($category['scheme'])
|| !is_string($category['scheme'])
|| !\Zend\URI\URL::validate($category['scheme'])
|| !\Zend\Uri\Url::validate($category['scheme'])
) {
throw new FeedException('The Atom scheme or RSS domain of'
. ' a category must be a valid URI');
Expand Down Expand Up @@ -585,7 +585,7 @@ public function setEnclosure(array $enclosure)
if (!isset($enclosure['uri'])) {
throw new FeedException('Enclosure "uri" is not set');
}
if (!\Zend\URI\URL::validate($enclosure['uri'])) {
if (!\Zend\Uri\Url::validate($enclosure['uri'])) {
throw new FeedException('Enclosure "uri" is not a valid URI/IRI');
}
$this->_data['enclosure'] = $enclosure;
Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Feed/Writer/Extension/ITunes/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @namespace
*/
namespace Zend\Feed\Writer\Extension\ITunes;
use Zend\URI;
use Zend\Uri;

/**
* @uses \Zend\Feed\Exception
Expand Down Expand Up @@ -170,7 +170,7 @@ public function setItunesCategories(array $values)
*/
public function setItunesImage($value)
{
if (!\Zend\URI\URL::validate($value)) {
if (!\Zend\Uri\Url::validate($value)) {
throw new \Zend\Feed\Exception('invalid parameter: "image" may only'
. ' be a valid URI/IRI');
}
Expand Down Expand Up @@ -249,7 +249,7 @@ public function setItunesKeywords(array $value)
*/
public function setItunesNewFeedUrl($value)
{
if (!\Zend\URI\URL::validate($value)) {
if (!\Zend\Uri\Url::validate($value)) {
throw new \Zend\Feed\Exception('invalid parameter: "newFeedUrl" may only'
. ' be a valid URI/IRI');
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Feed/Writer/Renderer/Entry/Atom.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ protected function _setId(\DOMDocument $dom, \DOMElement $root)
$this->getDataContainer()->setId(
$this->getDataContainer()->getLink());
}
if (!\Zend\URI\URL::validate($this->getDataContainer()->getId()) &&
if (!\Zend\Uri\Url::validate($this->getDataContainer()->getId()) &&
!preg_match('#^urn:[a-zA-Z0-9][a-zA-Z0-9\-]{1,31}:([a-zA-Z0-9\(\)\+\,\.\:\=\@\;\$\_\!\*\-]|%[0-9a-fA-F]{2})*#', $this->getDataContainer()->getId())) {
throw new Feed\Exception('Atom 1.0 IDs must be a valid URI/IRI');
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Feed/Writer/Renderer/Entry/RSS.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ protected function _setId(\DOMDocument $dom, \DOMElement $root)
}
$text = $dom->createTextNode($this->getDataContainer()->getId());
$id->appendChild($text);
if (!\Zend\URI\URL::validate($this->getDataContainer()->getId())) {
if (!\Zend\Uri\Url::validate($this->getDataContainer()->getId())) {
$id->setAttribute('isPermaLink', 'false');
}
}
Expand Down
Loading

0 comments on commit 77dfef4

Please sign in to comment.