public static function compilePartial($template, $options = array('flags' => self::FLAG_BESTPERFORMANCE)) {
        $context = Context::create($options);

        if (static::handleError($context)) {
            return false;
        }

        $code = Partial::compile($context, SafeString::escapeTemplate($template));

        static::$lastParsed = Compiler::$lastParsed;

        // return false when fatal error
        if (static::handleError($context)) {
            return false;
        }

        return $code;
    }
public static function compilePartial($template, $options = array('flags' => self::FLAG_BESTPERFORMANCE)) {
        $context = Context::create($options);

        if (static::handleError($context)) {
            return false;
        }

        $code = Partial::compile($context, SafeString::escapeTemplate($template));

        static::$lastParsed = Compiler::$lastParsed;

        // return false when fatal error
        if (static::handleError($context)) {
            return false;
        }

        return $code;
    }
public static function compilePartial ( $ template , $ options = array ( 'flags' => self :: FLAG_BESTPERFORMANCE ) ) { $ context = Context :: create ( $ options ) ; if ( static :: handleError ( $ context ) ) { return false ; } $ code = Partial :: compile ( $ context , SafeString :: escapeTemplate ( $ template ) ) ; static :: $ lastParsed = Compiler :: $ lastParsed ; // return false when fatal error if ( static :: handleError ( $ context ) ) { return false ; } return $ code ; }
Compile handlebars partial into PHP function code.

@param string $template handlebars template string
@param array<string,array|string|integer> $options LightnCandy compile time and run time options, default is array('flags' => LightnCandy::FLAG_BESTPERFORMANCE)

@return string|false Compiled PHP code when successed. If error happened and compile failed, return false.

@expect false when input '{{"}}', array('flags' => LightnCandy::FLAG_HANDLEBARS)
Compile handlebars partial into PHP function code .