# -*- coding: utf-8 -*-

import os
import cgi


class PearCGI(object):

	def __init__(self):
		return

	def isPost(self):
		if(os.environ["REQUEST_METHOD"] == "POST"):
			return True
		else:
			return False

	def isGet(self):
		if(os.environ["REQUEST_METHOD"] == "GET"):
			return True
		else:
			return False

	def isPut(self):
		if(os.environ["REQUEST_METHOD"] == "PUT"):
			return True
		else:
			return False

	def isDelete(self):
		if(os.environ["REQUEST_METHOD"] == "DELETE"):
			return True
		else:
			return False

	def getParam(self):
		param = cgi.FieldStorage()
		return param


# -*- coding: utf-8 -*-

import os
import cgi


class PearCGI(object):

	def __init__(self):
		self.param = None
		return

	def getMethod(self):
		methodName = os.environ['REQUEST_METHOD']
		return methodName

	def isMethod(self, methodName):
		if(self.getMethod() == methodNeme):
			return True
		else:
			return False

	def getParam(self):
		self.param = cgi.FieldStorage()
		return self.param

	def getValue(self,valueName):
		value = self.param.getvalue(valueName)
		return value

	def isValue(self, value):
		if not value
			return False
		else
			return True

replace cgi's function name