<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */

namespace Kufer\Web\KuferTools\Utils\FilterSearch\Method;

use Kufer\Web\Classes\Dbfilter\ISQLFilter;

class GreaterEqualsDateMethod extends AbstractDateMethod
{
  
  public function __construct($fnApply)
  {
    if (is_string($fnApply)) {
      parent::__construct(static function(ISQLFilter $filter, $value) use ($fnApply): ISQLFilter {
        return \call_user_func(array($filter, 'greaterEquals' . $fnApply), $value);
      });
    } else {
      parent::__construct($fnApply);
    }
  }
}