public function addSlashes($text)
    {
        if (isset($this->sqlLink) && method_exists($this->sqlLink,
                'real_escape_string')) {
            $slashed = $this->sqlLink->real_escape_string($text);
        } else {
            $slashed = addslashes($text);
        }

        return $slashed;
    }