protected function encode(array $parameters)
    {
        $uri = '';

        if ($parameters) {
            foreach ($parameters as $parameter => $value) {
                $uri .= $parameter . '=' . urlencode(stripslashes($value)) . '&';
            }
        }

        $uri = substr($uri, 0, strlen($uri)-1);

        return $uri;
    }