From 9ded57eb084fc60f8326f8eb11272b19f849825e Mon Sep 17 00:00:00 2001 From: tomasz Date: Wed, 28 Mar 2018 22:03:37 +0200 Subject: [PATCH] Add __isset to Endpoint --- src/Endpoint.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Endpoint.php b/src/Endpoint.php index 8831751..46e09ff 100644 --- a/src/Endpoint.php +++ b/src/Endpoint.php @@ -62,6 +62,17 @@ public function __get($key) return $this->parameters[$key]; } + /** + * Magic method to inform if specific parameter is available + * + * @param string $key + * @return boolean + */ + public function __isset($key) + { + return isset($this->parameters[$key]); + } + /** * Check if the HTTP method is accepted and send a HTTP request to it. * Retrieve error from the request and throw a new error