Home arrow PHP arrow Inheritance and Polymorphism in PHP: Building a Form Generator - Part II

Inheritance and Polymorphism in PHP: Building a Form Generator - Part II

In part two of this three-part series, we refresh our memory of Inheritance and subclasses from part one, and take our first stab at implementing a form generator.

  1. Inheritance and Polymorphism in PHP: Building a Form Generator - Part II
  2. That refreshing touch: core definition for base class and subclasses
  3. There is a long list in your life: listing the full code for each subclass
  4. Coming up: more subclasses
  5. Implementing the Form Generator: take one
By: Alejandro Gervasio
Rating: starstarstarstarstar / 28
April 12, 2005

print this article




Welcome to Part II of the series "Inheritance and Polymorphism in PHP: Building a Form Generator." I really hope that you found the concepts explained in the first part useful. As you may recall, in part I we introduced the OOP arena in PHP, using the capabilities of Inheritance for creating an extensible form generator.

Stepping back to refresh our memories, we defined a base form object class and derived each subclass that defines the bare bones for each form element. For the complete list of classes, please take a look at the first article, to quickly grasp how they were structured. It's fairly simple.

In this second article, we will get a bit more complex. We're going to complete the source code for each class definition, having an overall concept of the mechanism to make the form generator work properly.

So, it's time to show our work in progress and fully define the subclasses for each form element. Let's get started.

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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- 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: