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; + } }