28 lines
686 B
C++
28 lines
686 B
C++
#include "CGIFormattedData.h"
|
|
#include "ZString.h"
|
|
|
|
namespace coreutils {
|
|
|
|
CGIFormattedData::CGIFormattedData() {}
|
|
|
|
CGIFormattedData::CGIFormattedData(ZString cgiData) {
|
|
cgiData.split("&");
|
|
for(int ix = 0; ix < cgiData.getList().size(); ++ix) {
|
|
cgiData[ix].split("=");
|
|
data[cgiData[ix][0]] = cgiData[ix][1];
|
|
data[cgiData[ix][0]].fromCGI();
|
|
}
|
|
}
|
|
|
|
ZString CGIFormattedData::operator=(ZString cgiData) {
|
|
cgiData.split("&");
|
|
for(int ix = 0; ix < cgiData.getList().size(); ++ix) {
|
|
cgiData[ix].split("=");
|
|
data[cgiData[ix][0]] = cgiData[ix][1];
|
|
data[cgiData[ix][0]].fromCGI();
|
|
}
|
|
return cgiData;
|
|
}
|
|
|
|
}
|