protected function _checkPermissions()
    {
        if($this->_allowedHostnames === NULL)
            return;

        if(key_exists('REMOTE_HOST', $_SERVER))
            $host = $_SERVER['REMOTE_HOST'];
        else
            $host = $_SERVER['REMOTE_ADDR'];

        if(!in_array($host, $this->_allowedHostnames))
            throw new Exception("Requests from hostname ($host) are not allowed");
    }