protected static function customHelper(&$context, $vars, $raw, $nosep, $subExp = false) {
        if (count($vars[0]) > 1) {
            return;
        }

        if (!isset($context['helpers'][$vars[0][0]])) {
            if ($subExp) {
                if ($vars[0][0] == 'lookup') {
                    return static::compileLookup($context, $vars, $raw, true);
                }
            }
            return;
        }

        $fn = $raw ? 'raw' : $context['ops']['enc'];
        $ch = array_shift($vars);
        $v = static::getVariableNames($context, $vars);
        static::addUsageCount($context, 'helpers', $ch[0]);
        $sep = $nosep ? '' : $context['ops']['seperator'];

        return $sep . static::getFuncName($context, 'hbch', "$ch[0] " . implode(' ', $v[1])) . "\$cx, '$ch[0]', {$v[0]}, '$fn', \$in)$sep";
    }
protected static function customHelper(&$context, $vars, $raw, $nosep, $subExp = false) {
        if (count($vars[0]) > 1) {
            return;
        }

        if (!isset($context['helpers'][$vars[0][0]])) {
            if ($subExp) {
                if ($vars[0][0] == 'lookup') {
                    return static::compileLookup($context, $vars, $raw, true);
                }
            }
            return;
        }

        $fn = $raw ? 'raw' : $context['ops']['enc'];
        $ch = array_shift($vars);
        $v = static::getVariableNames($context, $vars);
        static::addUsageCount($context, 'helpers', $ch[0]);
        $sep = $nosep ? '' : $context['ops']['seperator'];

        return $sep . static::getFuncName($context, 'hbch', "$ch[0] " . implode(' ', $v[1])) . "\$cx, '$ch[0]', {$v[0]}, '$fn', \$in)$sep";
    }
protected static function customHelper ( & $ context , $ vars , $ raw , $ nosep , $ subExp = false ) { if ( count ( $ vars [ 0 ] ) > 1 ) { return ; } if ( ! isset ( $ context [ 'helpers' ] [ $ vars [ 0 ] [ 0 ] ] ) ) { if ( $ subExp ) { if ( $ vars [ 0 ] [ 0 ] == 'lookup' ) { return static :: compileLookup ( $ context , $ vars , $ raw , true ) ; } } return ; } $ fn = $ raw ? 'raw' : $ context [ 'ops' ] [ 'enc' ] ; $ ch = array_shift ( $ vars ) ; $ v = static :: getVariableNames ( $ context , $ vars ) ; static :: addUsageCount ( $ context , 'helpers' , $ ch [ 0 ] ) ; $ sep = $ nosep ? '' : $ context [ 'ops' ] [ 'seperator' ] ; return $ sep . static :: getFuncName ( $ context , 'hbch' , "$ch[0] " . implode ( ' ' , $ v [ 1 ] ) ) . "\$cx, '$ch[0]', {$v[0]}, '$fn', \$in)$sep" ; }
Return compiled PHP code for a handlebars custom helper token

@param array<string,array|string|integer> $context current compile context
@param array<boolean|integer|string|array> $vars parsed arguments list
@param boolean $raw is this {{{ token or not
@param boolean $nosep true to compile without seperator
@param boolean $subExp true when compile for subexpression

@return string|null Return compiled code segment for the token when the token is custom helper
Return compiled PHP code for a handlebars custom helper token