public function removeTrainingSlash($url)
    {
        if (null === $url || strlen($url) <= 2) {
            return $url;
        }

        return (substr($url, -1, 1) == '/')? substr($url, 0, -1) : $url;
    }