CodeIgniter Forums
User Guide Input Class confusing - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: User Guide Input Class confusing (/showthread.php?tid=41773)



User Guide Input Class confusing - El Forum - 05-16-2011

[eluser]chuckl[/eluser]
Overall great documentation. In the section covering the Input Class there are a couple of confusing issues.

1. The description for $this->input->get_post() does not indicate a second parameter but the example code provided shows one, e.g.
Code:
$this->input->get_post('some_data', TRUE);
and the actual class function does provide one. The description should most likely read
"This function is identical to the post or get functions, ..."

2. The example for $this->input->server() does not indicate a second parameter but the actual class function does provide one. The example mostly likely should be:
Code:
$this->input->server('some_data', TRUE);

3. There are two $this->input->cookie() sections; I believe the second is the more correct one but the second one appears to have incorrect examples, e.g.
Code:
cookie('some_cookie');
cookie('some_cookie', TRUE);
I believe they should be:
Code:
$this->input->cookie('some_cookie');
$this->input->cookie('some_cookie', TRUE);

4. The description and example for $this->input->request_headers do not indicate an optional parameter. I believe there should be additional wording, such as: "An optional parameter lets you run the data through the XSS filter. It's enabled by setting the parameter to boolean TRUE." A more complete explanation of what will be returned would be helpful.

5. The description for $this->input->get_request_header is lacking in any meaningful substance. There is no explanation for the two parameters.