LightnCandy\Validator::resolveHelper PHP Method

resolveHelper() public static method

use helperresolver to resolve helper, return true when helper founded
public static resolveHelper ( array\arraystring | integer> &$context, string &$name ) : string | null
$context array\arraystring | integer>
$name string helper name
return string | null $content helper function name or callable
    public static function resolveHelper(&$context, &$name)
    {
        if (isset($context['helpers'][$name])) {
            return true;
        }
        if ($context['helperresolver']) {
            $helper = $context['helperresolver']($context, $name);
            if ($helper) {
                $context['helpers'][$name] = $helper;
                return true;
            }
        }
    }