PHP
  Home arrow PHP arrow Abstract Classes in PHP: Working with ...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Abstract Classes in PHP: Working with PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 22
    2006-02-08

    Table of Contents:
  • Abstract Classes in PHP: Working with PHP 5
  • Working with a highly improved object model: defining abstract classes in PHP 5
  • Calling class methods out of the object context: using the scope resolution operator
  • Using abstract classes in PHP 5: setting up an example

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Abstract Classes in PHP: Working with PHP 5


    (Page 1 of 4 )

    Here we are again. This is the tutorial you’ve been waiting for! Welcome to the last part of the series “Abstract classes in PHP.” If you’ve already read the previous articles, then you’ll know that this series introduces the basics of abstract classes in PHP 4/PHP 5, and illustrates their use and implementation in concrete situations.

    Introduction

    Before I leap forward, it’s worth a brief look back to remind you of what you learned during the previous installment of this series, so it’ll be much easier to continue with the topics that will be discussed in this final tutorial. As you’ll recall, in the second part I demonstrated how to create a well-defined hierarchy of data processing PHP 4 classes, with the base class being abstract. This originally provided a set of undefined, highly generic methods for converting data to different formats.

    In consonance with the concepts deployed before, I derived two specific subclasses from the base class. These classes were responsible for processing file data, along with MySQL result sets. To achieve these tasks, each child class provided a concrete implementation for each generic method declared within the corresponding parent class. This condition demonstrated how to use a PHP 4 abstract class as the starting point from which to derive as many subclasses as needed, in order to perform concrete operations within a given PHP application.

    As you know, the whole idea of defining an abstract class is to allow you to define generic characteristics of a given object (including properties and methods), and then implement a concrete functionality by using the methods of the respective subclasses. So now it’s clear and fresh in your mind what abstract classes are and how to use them during the development cycle of a Web application.

    That said, in this last part of the series, I’ll explain the key points of abstract classes in PHP 5, and additionally provide you with some hands-on examples. This should give you a clear idea of how to utilize them within the powerful Object Model implemented in the latest version of PHP.

    Assuming that you’re interested in learning more about PHP 5 abstract classes, it’s time to move forward and find out how to use them. Let’s get going!

    More PHP Articles
    More By Alejandro Gervasio


       · If you've been reading the previous articles of this series, probably you'll find...
     

       

    PHP ARTICLES

    - Building a Database-Driven Application with ...
    - User Authentication for a Project Management...
    - Introduction to the CodeIgniter PHP Framework
    - Adding Users for a Project Management Applic...
    - Migrating Class Code for a MIME Email to PHP...
    - Login and Logout Authentication for a Projec...
    - Composing Messages in HTML for MIME Email wi...
    - Project Management: Authentication
    - A Better Way to Determine MIME Types for MIM...
    - Project Management Overview
    - Handling Attachments in MIME Email with PHP
    - Completing the Project Management Application
    - Sending MIME Email with PHP
    - Handling Files for a Project Management Appl...
    - Viewing and Editing Tasks for a Project Mana...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway