public function escapeStringValue($value, $quote = true)
    {
        $output = addcslashes((string)$value, "'");
        if ($quote === true) {
            $output = "'" . $output . "'";
        }

        return $output;
    }