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

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

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

@param string $value The string to escape.
@param boolean $quote If the string should be quoted or not.
@return string
Escape string values .