LightnCandy\Runtime::enc PHP Method

enc() public static method

For {{var}} .
public static enc ( array\arraystring | integer> $cx, arraystring | integer> | integer | null $var ) : string
$cx array\arraystring | integer>
$var arraystring | integer> | integer | null
return string The htmlencoded value of the specified variable
    public static function enc($cx, $var)
    {
        if ($var instanceof \LightnCandy\SafeString) {
            return (string) $var;
        }
        return htmlentities(static::raw($cx, $var), ENT_QUOTES, 'UTF-8');
    }