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

DevShed:
Enforcing Object Types in PHP - Using the Type Hinting Feature in PHP 5
Mar 02, 2006 @ 12:42:19

DevShed has posted the last article in their "Enforcing Object Types in PHP" series today - "Using the Type Hinting Feature in PHP5".

[Returning] to the subject of this last tutorial, I'll introduce another method for enforcing object types in PHP 5: the "Type Hinting" feature. It can also be used in conjunction with the "instanceof" operator that you learned about before, in order to develop PHP applications that implement thorough routines for filtering unwanted objects. Generally speaking, when you finish reading this article, you should be armed with a few more methods for forcing object types in PHP, in this way expanding your overall knowledge of object-oriented programming.

They start with an introduction to type hinting and some basic examples of its use. From there, they build up a relevant example with the help of their (X)HTML widget class they've used throughout the series.

tagged: enforcing object types using type hinting php5 enforcing object types using type hinting php5

Link:

DevShed:
Enforcing Object Types in PHP - Using the Type Hinting Feature in PHP 5
Mar 02, 2006 @ 12:42:19

DevShed has posted the last article in their "Enforcing Object Types in PHP" series today - "Using the Type Hinting Feature in PHP5".

[Returning] to the subject of this last tutorial, I'll introduce another method for enforcing object types in PHP 5: the "Type Hinting" feature. It can also be used in conjunction with the "instanceof" operator that you learned about before, in order to develop PHP applications that implement thorough routines for filtering unwanted objects. Generally speaking, when you finish reading this article, you should be armed with a few more methods for forcing object types in PHP, in this way expanding your overall knowledge of object-oriented programming.

They start with an introduction to type hinting and some basic examples of its use. From there, they build up a relevant example with the help of their (X)HTML widget class they've used throughout the series.

tagged: enforcing object types using type hinting php5 enforcing object types using type hinting php5

Link:

DevShed:
Enforcing Object Types in PHP - Filtering Input Objects in PHP 4
Feb 16, 2006 @ 12:56:50

In this latest tutorial on DevShed today, they look at methods to enforce the types of objects in a PHP4 environment.

When you are writing an object-based web application in PHP, you want to prevent your classes from being convoluted with input objects of the incorrect type. These input objects can cause the application to throw a fatal error. In this article, you will learn how to enforce object types in PHP 4.

By the end of this series, hopefully you'll have a clear idea of how to force object types inside of your PHP application, in this way avoiding further problems related to the so-called code contamination.

They start off with the creation of an (X)HTML widgets class to render certain page elements. Then, they show you the creation of a class to render the page and display them in a full document. There are examples of what happens when type checking isn't done and how to enforce the types inside of your class.

tagged: enforcing object types filtering input HTML widgets enforcing object types filtering input HTML widgets

Link:

DevShed:
Enforcing Object Types in PHP - Filtering Input Objects in PHP 4
Feb 16, 2006 @ 12:56:50

In this latest tutorial on DevShed today, they look at methods to enforce the types of objects in a PHP4 environment.

When you are writing an object-based web application in PHP, you want to prevent your classes from being convoluted with input objects of the incorrect type. These input objects can cause the application to throw a fatal error. In this article, you will learn how to enforce object types in PHP 4.

By the end of this series, hopefully you'll have a clear idea of how to force object types inside of your PHP application, in this way avoiding further problems related to the so-called code contamination.

They start off with the creation of an (X)HTML widgets class to render certain page elements. Then, they show you the creation of a class to render the page and display them in a full document. There are examples of what happens when type checking isn't done and how to enforce the types inside of your class.

tagged: enforcing object types filtering input HTML widgets enforcing object types filtering input HTML widgets

Link:


Trending Topics: