If you’re an enthusiastic PHP developer interested in learning how to build helper classes, you've come to the right place. This article series will teach you in a few simple steps how to build several kinds of helper classes for manipulating strings, generating dynamic URLs and validate incoming data, and so forth.
Welcome to the penultimate tutorial of the series on building helpers in PHP 5. Comprised of eight articles, this series provides you with the basic pointers to start creating your own helper classes with minor hassles, and complements the corresponding theory with a great variety of hands-on examples.
And now that you've been introduced to the aim of this series of articles, it’s time to review the topics that were treated in the last part. In that installment I finished building a simple helper class that could validate different types of data, including numeric and float numbers, IP and email addresses, and URLs as well.
The functionality of each method of this class was based mostly on PHP filters, since this extension not only permits you to perform a decent validation on incoming data, but it makes this a no-brainer process.
However, if you’re anything like me, then you may want to see how this validation helper class can be used in concrete situations, right? Well, in this tutorial I’m going to develop some basic examples that will illustrate the real capabilities of the class for verifying all the types of data mentioned above.
So, now it’s time to leave the preliminaries behind us and start evaluating this sample helper class through some concrete and easy-to-grasp examples. Let’s jump in!