Passage en Namespace et tous les tests fonctionnels OK

This commit is contained in:
2021-05-10 11:48:15 +02:00
parent 536dd0d56b
commit eb30d8ef97
56 changed files with 1091 additions and 964 deletions

View File

@@ -60,7 +60,7 @@ class Rss
return $this->link;
if (! is_string ($link))
throw new \Exception ("Link provided to RSS is not a string", 500);
$verify = new verify ();
$verify = new Verify ();
if (! $verify->is_URL ($link))
throw new \Exception ("Link provided to RSS is not an URL", 500);
if ($link === "")
@@ -124,14 +124,14 @@ class Rss
if (! is_string ($lastBuildDate))
throw new \Exception ("lastBuildDate provided to RSS is not a string",
500);
$verify = new verify ();
$verify = new Verify ();
if (! $verify->is_datetimeSQL ($lastBuildDate))
throw new \Exception ("lastBuildDate provided to RSS is not a valid date",
500);
if ($lastBuildDate === "")
$lastBuildDate = null;
else
$lastBuildDate = \convert::convertDate ($lastBuildDate, "Y-m-d H:i:s",
$lastBuildDate = Convert::convertDate ($lastBuildDate, "Y-m-d H:i:s",
\DateTime::RFC2822);
$this->lastBuildDate = $lastBuildDate;
return $this;
@@ -194,7 +194,7 @@ class Rss
$tmpItem->pubDate = $item->pubDate ();
}
// Ident correctely the xml created in SimpleXML
$dom = new DOMDocument('1.0');
$dom = new \DOMDocument('1.0');
$dom->preserveWhiteSpace = false;
$dom->formatOutput = true;
$dom->loadXML($xml->asXML());
@@ -258,7 +258,7 @@ class Rssitem
return $this->link;
if (! is_string ($link))
throw new \Exception ("Link provided to RSS Item is not a string", 500);
$verify = new verify ();
$verify = new Verify ();
if (! $verify->is_URL ($link))
throw new \Exception ("Link provided to RSS Item is not an URL", 500);
if ($link === "")
@@ -339,14 +339,14 @@ class Rssitem
if (! is_string ($pubDate))
throw new \Exception ("pubDate provided to RSS Item is not a string",
500);
if (! \verify::staticIs_datetimeSQL ($pubDate))
if (! Verify::staticIs_datetimeSQL ($pubDate))
throw new \Exception ("pubDate provided to RSS Item is not a valid date",
500);
if ($pubDate === "")
$pubDate = null;
else
$pubDate = \convert::convertDate ($pubDate, "Y-m-d H:i:s",
DateTime::RFC2822);
$pubDate = Convert::convertDate ($pubDate, "Y-m-d H:i:s",
\DateTime::RFC2822);
$this->pubDate = $pubDate;
return $this;
}