summaryrefslogtreecommitdiffstats
path: root/vendor/ipl/web/src/FormElement/TermInput/Term.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ipl/web/src/FormElement/TermInput/Term.php')
-rw-r--r--vendor/ipl/web/src/FormElement/TermInput/Term.php89
1 files changed, 89 insertions, 0 deletions
diff --git a/vendor/ipl/web/src/FormElement/TermInput/Term.php b/vendor/ipl/web/src/FormElement/TermInput/Term.php
new file mode 100644
index 0000000..be08e8a
--- /dev/null
+++ b/vendor/ipl/web/src/FormElement/TermInput/Term.php
@@ -0,0 +1,89 @@
+<?php
+
+namespace ipl\Web\FormElement\TermInput;
+
+interface Term
+{
+ /** @var string The default validation constraint */
+ public const DEFAULT_CONSTRAINT = '^\s*(?!%s\b).*\s*$';
+
+ /**
+ * Set the search value
+ *
+ * @param string $value
+ *
+ * @return $this
+ */
+ public function setSearchValue(string $value);
+
+ /**
+ * Get the search value
+ *
+ * @return string
+ */
+ public function getSearchValue(): string;
+
+ /**
+ * Set the label
+ *
+ * @param string $label
+ *
+ * @return $this
+ */
+ public function setLabel(string $label);
+
+ /**
+ * Get the label
+ *
+ * @return ?string
+ */
+ public function getLabel(): ?string;
+
+ /**
+ * Set the CSS class
+ *
+ * @param string $class
+ *
+ * @return $this
+ */
+ public function setClass(string $class);
+
+ /**
+ * Get the CSS class
+ *
+ * @return ?string
+ */
+ public function getClass(): ?string;
+
+ /**
+ * Set the failure message
+ *
+ * @param string $message
+ *
+ * @return $this
+ */
+ public function setMessage(string $message);
+
+ /**
+ * Get the failure message
+ *
+ * @return ?string
+ */
+ public function getMessage(): ?string;
+
+ /**
+ * Set the validation constraint
+ *
+ * @param string $pattern
+ *
+ * @return $this
+ */
+ public function setPattern(string $pattern);
+
+ /**
+ * Get the validation constraint
+ *
+ * @return ?string
+ */
+ public function getPattern(): ?string;
+}