protected function setUrlPathImage()
    {
        $parts = explode('files/image/cache/', urldecode(strtok($this->server->requestUri(), '?')));

        if (empty($parts[1])) {
            throw new OutOfRangeException('Second segment is empty in the image cache path');
        }

        $parts = explode('/', $parts[1]);

        if (empty($parts[1])) {
            throw new OutOfRangeException('Second segment is empty in the image cache path');
        }

        $this->data_imagestyle_id = array_shift($parts);

        if ($parts[0] == 'image') {
            unset($parts[0]);
        }

        $this->data_path = implode('/', $parts);
    }