Signature Verification

by John McGeechan

The signature verifier script provides a simple way to validate the arguments passed to a function. Most functions sanitize their arguments before proceeding. Often this is via a set of repeated checks ie checking that a required field is not null or that it is the correct data type (array or int for example). If a function requires many arguments then this can result in a lot of code before the function can start it's actual work. The aim of this class is to abstract out as much of this as possible to improve readability and cut down on code duplication.


This is the main signature verifier class. It takes in a set of arguments from a function and returns an array of errors. It is left to the caller to decide how to display the errors or whether to throw exceptions. The class is extensible so that more verification functions can be added as required.

 see source


A set of tests for the signature verifier class

 see source

run tests