Home arrow PHP arrow Validating Incoming Data by Using Polymorphism with Objects in PHP 5

Validating Incoming Data by Using Polymorphism with Objects in PHP 5

If you're a PHP developer who wants to learn how to take advantage of polymorphism to build more efficient and robust object-oriented applications, then this group of articles might be what you need. Welcome to the final part of the series that started with "Using Polymorphism with Objects in PHP 5." Comprised of three tutorials, this series shows you how to create polymorphic classes with PHP; it also teaches you how to use them in real-world situations.

TABLE OF CONTENTS:
  1. Validating Incoming Data by Using Polymorphism with Objects in PHP 5
  2. Using polymorphism to validate input data
  3. Extending the implementation of polymorphism
  4. Validating user-supplied data by using polymorphic objects
By: Alejandro Gervasio
Rating: starstarstarstarstar / 4
April 04, 2007

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Introduction

Having already introduced the subject of this series of articles, let me step back quickly to the second tutorial to refresh your memory of the topics it covered. As you'll certainly recall, I demonstrated how one of the main pillars of object-oriented programming, that is polymorphism, can be used to generate dynamic web pages with minor hassles.

As you learned in that article, building basic web documents by using the functionality provided by a few polymorphic classes can be very useful, since this approach allows you to declare, for instance, one method that is shared by different sub classes, and define programmatically what kind of operations should be performed by the method in question.

In essence, the previous schema illustrates in a nutshell how polymorphism works, since this model demonstrates how different objects that belong to the same family can behave differently using an identical method. Of course, this capacity was applied to building dynamic web pages, but it can also be used in other cases, such as developing database abstraction classes, generating online forms, and so forth.

Speaking of the numerous situations where Polymorphism can be implemented successfully to build more efficient object-based programs, in this final installment of the series I'm going to show you how to develop an expandable PHP mechanism for validating different types of incoming data. This will demonstrate how this important pillar of object-oriented programming can be used with a plethora of applications.

So are you ready to learn how to use polymorphism for checking user-provided data? Okay, let's get started!



 
 
>>> More PHP Articles          >>> More By Alejandro Gervasio
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: