public function parse($data)
    {
        $parsedData = null;
        switch ($this->type) {
            case 'application/json':
                $parsedData = json_decode($data, true);
                break;
            case 'application/xml':
            case 'text/xml':
                $backup     = libxml_disable_entity_loader(true);
                $parsedData = simplexml_load_string($data);
                libxml_disable_entity_loader($backup);
                break;
            case 'application/x-www-form-urlencoded':
            case 'multipart/form-data':
                parse_str($data, $parsedData);
                break;
            default:
                $parsedData = null;
                break;
        }

        return $parsedData;
    }