Skip 'partial not found' error or exception. Use this to align with mustache specification.
Error when compile() and partial not found
Used option: FLAG_ERROR_LOG
NULLCan not find partial for 'not_found', you should provide partials or partialresolver in optionsrequire('./vendor/autoload.php');
use LightnCandy\LightnCandy;
$template = "{{> not_found}}";
$php = LightnCandy::compile($template, array(
"flags" => LightnCandy::FLAG_ERROR_LOG
));
Skip the error
Used option: FLAG_ERROR_EXCEPTION FLAG_ERROR_SKIPPARTIAL
NULLOK!OK!require('./vendor/autoload.php');
use LightnCandy\LightnCandy;
$template = "OK{{> not_found}}!";
$php = LightnCandy::compile($template, array(
"flags" => LightnCandy::FLAG_ERROR_EXCEPTION | LightnCandy::FLAG_ERROR_SKIPPARTIAL
));
$render = LightnCandy::prepare($php);
$data = NULL;
echo $render($data);