Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Sub Classing Exceptions in PHP 5
Oct 15, 2008 @ 17:06:24

DevShed has start up a new series today with the first part in a four-part series looking at exception handling in PHP5.

If you do any serious programming, whether it's in PHP 5 or some other language, you've needed to know how to handle run time errors and other "exceptional" conditions. You can do this by making your program throw generic exceptions. Or you can unlock the potential of PHP 5 and learn how to create custom exceptions, which is the subject of this four-part series.

In this first part they get you started with exceptions, showing how to throw them and catch them correctly (try/catch). They put it to good use in an example catching exceptions thrown from a MySQL connection and select.

tagged: php5 exception tutorial subclass try catch

Link:

DevShed:
Introducing the Chain of Responsibility Between PHP Objects
Oct 30, 2006 @ 18:18:00

DevShed is starting off a new series today with this first article talking about how to introduce the "chain of responsibility" method in how you use your objects.

In this three-part series, I'll show you how to create a chain of responsibility across different classes, which hopefully will give you a better understanding of how this schema can be implemented with PHP.

Since it's just the first part in the esries, they start with the whys and hows of the chain of command process before getting on with the actual code. For the foundation, they create some subclasses that will make the parts of the chain. Next up is combining them and, finally, making the "master class" to combine the links of the chain together. They use a "DataServer" example to work with local files.

tagged: tutorial chain responsibility object process pattern subclass tutorial chain responsibility object process pattern subclass

Link:

DevShed:
Introducing the Chain of Responsibility Between PHP Objects
Oct 30, 2006 @ 18:18:00

DevShed is starting off a new series today with this first article talking about how to introduce the "chain of responsibility" method in how you use your objects.

In this three-part series, I'll show you how to create a chain of responsibility across different classes, which hopefully will give you a better understanding of how this schema can be implemented with PHP.

Since it's just the first part in the esries, they start with the whys and hows of the chain of command process before getting on with the actual code. For the foundation, they create some subclasses that will make the parts of the chain. Next up is combining them and, finally, making the "master class" to combine the links of the chain together. They use a "DataServer" example to work with local files.

tagged: tutorial chain responsibility object process pattern subclass tutorial chain responsibility object process pattern subclass

Link:

DevShed:
Abstract Classes in PHP - Setting Up a Concrete Example
Feb 01, 2006 @ 13:54:08

DevShed has posted part two of their "Abstract Classes in PHP" series today, this time focusing on the creation of an example class structure.

Welcome to part two of the series "Abstract classes in PHP." In three tutorials, this series introduces the key concepts of abstract classes in PHP 4-PHP 5, and explores their application and use in different object-oriented development environments. Whether you're an experienced PHP developer wanting to fill in some gaps related to abstract classes, or only a beginner starting to taste the power of object-based programming in PHP, hopefully you'll find this series enjoyable and instructive.

They take a moment and look at how their example will be structured before jumping into the code. After that, they creat subclasses of the parent, defining the resultProcessor and fileProcessor classes. At the end, they combine them, creating a class that can parse data pushed into it (such as parsing out an XML file).

tagged: abstract class set up concrete example subclass process data abstract class set up concrete example subclass process data

Link:

DevShed:
Abstract Classes in PHP - Setting Up a Concrete Example
Feb 01, 2006 @ 13:54:08

DevShed has posted part two of their "Abstract Classes in PHP" series today, this time focusing on the creation of an example class structure.

Welcome to part two of the series "Abstract classes in PHP." In three tutorials, this series introduces the key concepts of abstract classes in PHP 4-PHP 5, and explores their application and use in different object-oriented development environments. Whether you're an experienced PHP developer wanting to fill in some gaps related to abstract classes, or only a beginner starting to taste the power of object-based programming in PHP, hopefully you'll find this series enjoyable and instructive.

They take a moment and look at how their example will be structured before jumping into the code. After that, they creat subclasses of the parent, defining the resultProcessor and fileProcessor classes. At the end, they combine them, creating a class that can parse data pushed into it (such as parsing out an XML file).

tagged: abstract class set up concrete example subclass process data abstract class set up concrete example subclass process data

Link:


Trending Topics: