From f784127892624eb5d7d35b9c82aab72cded0c3ca Mon Sep 17 00:00:00 2001 From: jetwitaussi Date: Fri, 5 Nov 2021 08:10:57 +0100 Subject: [PATCH] Add getCards on national player --- PHT/Config/Version.php | 2 +- PHT/Xml/Player/National.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/PHT/Config/Version.php b/PHT/Config/Version.php index 4b2bf92..a735f82 100644 --- a/PHT/Config/Version.php +++ b/PHT/Config/Version.php @@ -39,7 +39,7 @@ class Version const MATCHESARCHIVE = '1.3'; const MATCHLINEUP = '2.0'; const MATCHORDERS = '3.0'; - const NATIONALPLAYERS = '1.3'; + const NATIONALPLAYERS = '1.4'; const NATIONALTEAMDETAILS = '1.9'; const NATIONALTEAMMATCHES = '1.3'; const NATIONALTEAMS = '1.5'; diff --git a/PHT/Xml/Player/National.php b/PHT/Xml/Player/National.php index 568e4cf..13ef6d9 100644 --- a/PHT/Xml/Player/National.php +++ b/PHT/Xml/Player/National.php @@ -47,6 +47,16 @@ public function getName() return $this->getXml()->getElementsByTagName('PlayerName')->item(0)->nodeValue; } + /** + * Return player cards number + * + * @return string + */ + public function getCards() + { + return $this->getXml()->getElementsByTagName('Cards')->item(0)->nodeValue; + } + /** * Get full player details *