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

ArrayMergeDecorator.php « Decorators « src - github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c40e93b56fa4d64599c0b2332e6bf0d02e7cd25d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

/**
 * PHPPgAdmin6
 */

namespace PHPPgAdmin\Decorators;

class ArrayMergeDecorator extends Decorator
{
    public $m;

    public function __construct($arrays)
    {
        $this->m = $arrays;
    }

    /**
     * @param mixed $fields
     *
     * @return array
     */
    public function value($fields)
    {
        $accum = [];

        foreach ($this->m as $var) {
            $accum = \array_merge($accum, Decorator::get_sanitized_value($var, $fields));
        }

        return $accum;
    }
}