Added methods for adding get, post and file parameters manually.

This commit is contained in:
Simon Sessingø
2018-04-06 18:00:59 +02:00
parent d38f81836d
commit 5db4621831
2 changed files with 84 additions and 64 deletions
+33
View File
@@ -316,4 +316,37 @@ class InputHandler
return ($filter !== null) ? array_intersect_key($output, array_flip($filter)) : $output;
}
/**
* Add GET parameter
*
* @param string $key
* @param InputItem $item
*/
public function addGet(string $key, InputItem $item): void
{
$this->get[$key] = $item;
}
/**
* Add POST parameter
*
* @param string $key
* @param InputItem $item
*/
public function addPost(string $key, InputItem $item): void
{
$this->post[$key] = $item;
}
/**
* Add FILE parameter
*
* @param string $key
* @param InputFile $item
*/
public function addFile(string $key, InputFile $item): void
{
$this->file[$key] = $item;
}
}