diff options
| author | Malf Furious <m@lfurio.us> | 2017-06-27 01:43:16 -0400 | 
|---|---|---|
| committer | Malf Furious <m@lfurio.us> | 2017-06-27 01:43:16 -0400 | 
| commit | 09f403582c5de5dcc97b265e8ae42469c9c8ff3f (patch) | |
| tree | 2363f633dbacf2e6a4fd4738b06da74c831b208a /app/class | |
| parent | a607d74c3080cff5a9a9f4362f6da491982e8a6e (diff) | |
| download | scrott-09f403582c5de5dcc97b265e8ae42469c9c8ff3f.tar.gz scrott-09f403582c5de5dcc97b265e8ae42469c9c8ff3f.zip | |
Add function input()
Diffstat (limited to 'app/class')
| -rw-r--r-- | app/class/globals.php | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/app/class/globals.php b/app/class/globals.php index 94df716..776fc35 100644 --- a/app/class/globals.php +++ b/app/class/globals.php @@ -88,6 +88,17 @@ function isAction(string $action) : bool  }  /* + * Get an array of submitted form input + */ +function input() : array +{ +    if (!isset($_REQUEST['input'])) +        throw new Exception("Requested form input, but no input data was supplied"); + +    return $_REQUEST['input']; +} + +/*   * Check for errors, warnings, or notices   */  function isError(string $level) : bool | 
