correctly set request parameters for MailApi
This commit is contained in:
parent
e89c3ad550
commit
333c45773f
2 changed files with 109 additions and 9 deletions
|
|
@ -19,6 +19,46 @@
|
|||
*/
|
||||
class MailRequest extends \nre\core\Request
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Add a parameter.
|
||||
*
|
||||
* @param mixed $value Value of parameter
|
||||
*/
|
||||
public function addParam($value)
|
||||
{
|
||||
$this->params[] = $value;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add multiple parameters.
|
||||
*
|
||||
* @param mixed $value1 Value of first parameter
|
||||
* @param mixed … Values of further parameters
|
||||
*/
|
||||
public function addParams($value1)
|
||||
{
|
||||
$this->params = array_merge(
|
||||
$this->params,
|
||||
func_get_args()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete all stored parameters (from offset on).
|
||||
*
|
||||
* @param int $offset Offset-index
|
||||
*/
|
||||
public function clearParams($offset=0)
|
||||
{
|
||||
$this->params = array_slice($this->params, 0, $offset);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue