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

CallbackDecorator.php « decorators « src - github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1e2bb05c9725e7e4392946af80ed467edb25674d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php

/**
 * PHPPgAdmin v6.0.0-RC8
 */

namespace PHPPgAdmin\Decorators;

class CallbackDecorator extends Decorator
{
    public function __construct($callback, $param = null)
    {
        $this->fn = $callback;
        $this->p  = $param;
    }

    public function value($fields)
    {
        return call_user_func($this->fn, $fields, $this->p);
    }
}