Nextras\Forms\Controls\Fragments\ComponentControlTrait::tryCall PHP Method

tryCall() protected method

Calls public method if exists.
protected tryCall ( $method, array $params ) : boolean
$params array
return boolean does method exist?
    protected function tryCall($method, array $params)
    {
        $rc = $this->getReflection();
        if ($rc->hasMethod($method)) {
            $rm = $rc->getMethod($method);
            if ($rm->isPublic() && !$rm->isAbstract() && !$rm->isStatic()) {
                $this->checkRequirements($rm);
                $rm->invokeArgs($this, $rc->combineArgs($rm, $params));
                return TRUE;
            }
        }
        return FALSE;
    }