public static function read(&$context, $name) {
        $isPB = ($name === '@partial-block');
        $context['usedFeature']['partial']++;

        if (isset($context['usedPartial'][$name])) {
            return;
        }

        $cnt = static::resolve($context, $name);

        if ($cnt !== null) {
            $context['usedPartial'][$name] = SafeString::escapeTemplate($cnt);
            return static::compileDynamic($context, $name);
        }

        if (!$context['flags']['skippartial'] && !$isPB) {
            $context['error'][] = "Can not find partial for '$name', you should provide partials or partialresolver in options";
        }
    }
public static function read(&$context, $name) {
        $isPB = ($name === '@partial-block');
        $context['usedFeature']['partial']++;

        if (isset($context['usedPartial'][$name])) {
            return;
        }

        $cnt = static::resolve($context, $name);

        if ($cnt !== null) {
            $context['usedPartial'][$name] = SafeString::escapeTemplate($cnt);
            return static::compileDynamic($context, $name);
        }

        if (!$context['flags']['skippartial'] && !$isPB) {
            $context['error'][] = "Can not find partial for '$name', you should provide partials or partialresolver in options";
        }
    }
public static function read ( & $ context , $ name ) { $ isPB = ( $ name === '@partial-block' ) ; $ context [ 'usedFeature' ] [ 'partial' ] ++ ; if ( isset ( $ context [ 'usedPartial' ] [ $ name ] ) ) { return ; } $ cnt = static :: resolve ( $ context , $ name ) ; if ( $ cnt !== null ) { $ context [ 'usedPartial' ] [ $ name ] = SafeString :: escapeTemplate ( $ cnt ) ; return static :: compileDynamic ( $ context , $ name ) ; } if ( ! $ context [ 'flags' ] [ 'skippartial' ] && ! $ isPB ) { $ context [ 'error' ] [ ] = "Can not find partial for '$name', you should provide partials or partialresolver in options" ; } }
Read partial file content as string and store in context

@param array<string,array|string|integer> $context Current context of compiler progress.
@param string $name partial name

@return string|null $code compiled PHP code when success
Read partial file content as string and store in context