From c4fb8fa551c2ed1111b271a19a5dc3d9b4479340 Mon Sep 17 00:00:00 2001 From: jetwitaussi Date: Wed, 18 Sep 2024 19:50:45 +0200 Subject: [PATCH] Update teamdetails v3.7 Add isDeactivated on senior team --- PHT/Config/Version.php | 2 +- PHT/Xml/Team/Senior.php | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/PHT/Config/Version.php b/PHT/Config/Version.php index 4a59abc..9f15ce2 100644 --- a/PHT/Config/Version.php +++ b/PHT/Config/Version.php @@ -52,7 +52,7 @@ class Version const STAFFAVATARS = '1.1'; const STAFFLIST = '1.2'; const SUPPORTERS = '1.0'; - const TEAMDETAILS = '3.6'; + const TEAMDETAILS = '3.7'; const TOURNAMENTDETAILS = '1.0'; const TOURNAMENTFIXTURES = '1.0'; const TOURNAMENTLEAGUETABLES = '1.1'; diff --git a/PHT/Xml/Team/Senior.php b/PHT/Xml/Team/Senior.php index cadc082..fd5caac 100644 --- a/PHT/Xml/Team/Senior.php +++ b/PHT/Xml/Team/Senior.php @@ -941,6 +941,19 @@ public function isDeleted() return $this->getXml()->getElementsByTagName('Team')->length == 0; } + /** + * Return if team is deactivated + * + * @return boolean + */ + public function isDeactivated() + { + if ($this->isDeleted()) { + return true; + } + return strtolower($this->getXml()->getElementsByTagName('IsDeactivated')->item(0)->nodeValue) == 'true'; + } + /** * Return if team is primary team *