Provides access and XSS filtering to GET and POST input variables
To fetch get variables, simple use Picombo::Input.instance().get(get_key)
To fetch post variables, simple use Picombo::Input.instance().post(post)
To return the entire input hash, omit the key
If the key is not found, the default parameter is returned, by default nil
Retrieves a GET item by key. If the key doesn’t exist, return default Optionaly returns the entire GET hash if key is nil
# File lib/classes/input.rb, line 22
22: def get(key = nil, default = nil)
23: return @req.GET() if key.nil?
24:
25: get = @req.GET()
26: return get[key] if get.has_key?(key)
27:
28: default
29: end
Retrieves a POST item by key. If the key doesn’t exist, return default Optionaly returns the entire POST hash if key is nil
# File lib/classes/input.rb, line 43
43: def post(key = nil, default = nil)
44: return @req.POST() if key.nil?
45:
46: post = @req.POST()
47: return post[key] if post.has_key?(key)
48:
49: default
50: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.