Skip to content

Commit

Permalink
Move Parser package
Browse files Browse the repository at this point in the history
  • Loading branch information
webeweb committed Mar 9, 2020
1 parent d3f2aec commit f053f0d
Show file tree
Hide file tree
Showing 8 changed files with 1,069 additions and 1,069 deletions.
8 changes: 4 additions & 4 deletions src/IO/Reader.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
use GuzzleHttp\Client;
use Psr\Log\LoggerInterface;
use WBW\Library\XMLTV\Model\Tv;
use WBW\Library\XMLTV\Parser\Parser;
use WBW\Library\XMLTV\Parser\ParserHelper;
use WBW\Library\XMLTV\Serializer\XmlDeserializer;
use WBW\Library\XMLTV\Serializer\XmlDeserializerHelper;
use WBW\Library\XMLTV\Statistic\Statistic;
use WBW\Library\XMLTV\Statistic\Statistics;

Expand Down Expand Up @@ -68,9 +68,9 @@ public static function readXML($filename, LoggerInterface $logger = null) {
$document = new DOMDocument();
$document->load($filename);

ParserHelper::setLogger($logger);
XmlDeserializerHelper::setLogger($logger);

return Parser::parseTv($document->documentElement);
return XmlDeserializer::deserializeTv($document->documentElement);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Attribute/StringStartTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace WBW\Library\XMLTV\Model\Attribute;

use DateTime;
use WBW\Library\XMLTV\Parser\ParserHelper;
use WBW\Library\XMLTV\Serializer\XmlDeserializerHelper;

/**
* String start trait.
Expand Down Expand Up @@ -44,7 +44,7 @@ public function getStart() {
* @return DateTime|null Returns the start into DateTime in case of success, null otherwise.
*/
public function getStartDateTime() {
return ParserHelper::parseDateTime($this->start);
return XmlDeserializerHelper::deserializeDateTime($this->start);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions src/Model/Programme.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use WBW\Library\XMLTV\Model\Attribute\StringChannelTrait;
use WBW\Library\XMLTV\Model\Attribute\LanguageTrait;
use WBW\Library\XMLTV\Model\Attribute\StringStartTrait;
use WBW\Library\XMLTV\Parser\ParserHelper;
use WBW\Library\XMLTV\Serializer\XmlDeserializerHelper;

/**
* Programme.
Expand Down Expand Up @@ -275,7 +275,7 @@ public function getPdcStart() {
* @return DateTime|null Returns the stop into DateTime in case of success, null otherwise.
*/
public function getPdcStartDateTime() {
return ParserHelper::parseDateTime($this->pdcStart);
return XmlDeserializerHelper::deserializeDateTime($this->pdcStart);
}

/**
Expand Down Expand Up @@ -320,7 +320,7 @@ public function getStop() {
* @return DateTime|null Returns the stop into DateTime in case of success, null otherwise.
*/
public function getStopDateTime() {
return ParserHelper::parseDateTime($this->stop);
return XmlDeserializerHelper::deserializeDateTime($this->stop);
}

/**
Expand Down Expand Up @@ -356,7 +356,7 @@ public function getVpsStart() {
* @return DateTime|null Returns the stop into DateTime in case of success, null otherwise.
*/
public function getVpsStartDateTime() {
return ParserHelper::parseDateTime($this->vpsStart);
return XmlDeserializerHelper::deserializeDateTime($this->vpsStart);
}

/**
Expand Down
Loading

0 comments on commit f053f0d

Please sign in to comment.