1<?php
2
3namespace dokuwiki\plugin\structcondstyle\meta;
4
5/**
6 * Class Operator
7 *
8 * Describes a boolean operator used to evaluate conditions
9 *
10 * @package  dokuwiki\plugin\structcondstyle\meta
11 */
12class Operator
13{
14    private $reg;
15    private $eval_func_name;
16
17    function __construct($reg,$eval_func)
18    {
19        $this->reg = $reg;
20        $this->eval_func_name = $eval_func;
21    }
22
23    function getReg(){
24        return $this->reg;
25    }
26
27    function evaluate($lhs, $rhs){
28        return call_user_func($this->eval_func_name,$lhs,$rhs);
29    }
30}
31
32?>