From eeafcb7862048426a262dc22c27ca6457567ca42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Tue, 3 May 2016 07:20:52 +0200 Subject: [PATCH] Added exist method to Input class. --- src/Pecee/Http/Input/Input.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Pecee/Http/Input/Input.php b/src/Pecee/Http/Input/Input.php index bdbb7a4..caed6bc 100644 --- a/src/Pecee/Http/Input/Input.php +++ b/src/Pecee/Http/Input/Input.php @@ -97,6 +97,10 @@ class Input { return $default; } + public function exists($index) { + return ($this->getObject($index) !== null); + } + public function setGet() { $this->get = new InputCollection();