Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Decorators/ConcatDecorator.php')
-rw-r--r--src/Decorators/ConcatDecorator.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/Decorators/ConcatDecorator.php b/src/Decorators/ConcatDecorator.php
new file mode 100644
index 00000000..cd79a134
--- /dev/null
+++ b/src/Decorators/ConcatDecorator.php
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * PHPPgAdmin6
+ */
+
+namespace PHPPgAdmin\Decorators;
+
+class ConcatDecorator extends Decorator
+{
+ public $c;
+
+ public function __construct($values)
+ {
+ $this->c = $values;
+ }
+
+ /**
+ * @param mixed $fields
+ *
+ * @return string
+ */
+ public function value($fields)
+ {
+ $accum = '';
+
+ foreach ($this->c as $var) {
+ $accum .= Decorator::get_sanitized_value($var, $fields);
+ }
+
+ return \trim($accum);
+ }
+}