summaryrefslogtreecommitdiff
path: root/src/Http/Validation/Rules/In.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-07-21 13:42:19 +0200
committerGitHub <noreply@github.com>2019-07-21 13:42:19 +0200
commit43fa21f6553bb9e46f00d0768eab56e74c842bb4 (patch)
tree00df255fcd7c3777855bee27967117440c4add8c /src/Http/Validation/Rules/In.php
parent4f60daa29568a43ab1da761d89124308dc7b37e7 (diff)
parent1e16f4c47ec15ffea41e1fa612d205b8db2a16d1 (diff)
Merge branch 'master' into docker
Diffstat (limited to 'src/Http/Validation/Rules/In.php')
-rw-r--r--src/Http/Validation/Rules/In.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Http/Validation/Rules/In.php b/src/Http/Validation/Rules/In.php
new file mode 100644
index 00000000..d585cc3d
--- /dev/null
+++ b/src/Http/Validation/Rules/In.php
@@ -0,0 +1,21 @@
+<?php
+
+namespace Engelsystem\Http\Validation\Rules;
+
+use Respect\Validation\Rules\In as RespectIn;
+
+class In extends RespectIn
+{
+ /**
+ * @param mixed $haystack
+ * @param bool $compareIdentical
+ */
+ public function __construct($haystack, $compareIdentical = false)
+ {
+ if (!is_array($haystack)) {
+ $haystack = explode(',', $haystack);
+ }
+
+ parent::__construct($haystack, $compareIdentical);
+ }
+}