From 5cb4a246b0fa67ee1af032900345ea7284297d6a Mon Sep 17 00:00:00 2001 From: Rick Tibbe Date: Tue, 8 Sep 2020 17:06:25 +0200 Subject: [PATCH] Test commit --- .idea/modules.xml | 8 ++++++++ .idea/php-club-dataservice.iml | 8 ++++++++ .idea/workspace.xml | 6 ++++++ src/Api.php | 23 +++++++++++++++++++++++ 4 files changed, 45 insertions(+) create mode 100644 .idea/modules.xml create mode 100644 .idea/php-club-dataservice.iml create mode 100644 .idea/workspace.xml diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..4f1d34b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php-club-dataservice.iml b/.idea/php-club-dataservice.iml new file mode 100644 index 0000000..c956989 --- /dev/null +++ b/.idea/php-club-dataservice.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..f2c45dc --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/src/Api.php b/src/Api.php index 2a26a18..05aa8cd 100644 --- a/src/Api.php +++ b/src/Api.php @@ -118,4 +118,27 @@ public function getClub() return $this->club; } + + /** + * Get the club data + * + * @return Club + */ + public function getMatch() + { + if($this->club) { + return $this->club; + } + + $response = $this->request('clubgegevens'); + + $data = $response['gegevens']; + if (isset($response['bezoekadres'])) { + $data['bezoekadres'] = new Bezoekadres($this, $response['bezoekadres']); + } + + $this->club = new Club($this, $data); + + return $this->club; + } }