News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

DevShed:
Executing Destructors Manually in PHP 5
0 comments :: posted Wednesday February 13, 2008 @ 11:27:00
voice your opinion now!

Finishing off their series on destructors in PHP5 applications today, DevShed has posted this new tutorial showing how to manually run the destructors of your class (in case there's ever a need).

In this final tutorial of the series I'm going to show you how to manually trigger a destructor, and in addition you'll learn how to emulate the behavior of this magic method when using PHP 4.

They not only talk about how to call the destructor manually but they also show how to call multiple destructors at the same time to destroy lots of objects at once. And, as promised, they include a method for being able to use a destructor-like bit of functionality in a PHP4 app as well.

tagged with: php5 destructor execute manual php4 emulate multiple


DevShed:
Retrieving Information on Several Objects with Destructors in PHP 5
0 comments :: posted Thursday February 07, 2008 @ 10:28:00
voice your opinion now!

DevShed has posted the next-to-last (part four) of their series looking at destructors in PHP5 applications today. This time they focus on passing information back out of the destructors as the script is finishing.

In this fourth article of the series I'm going to teach you how perform this process when working with multiple objects (remember that you already learned how to achieve this using only one class instance).

They start simple, showing how to handle one object to give you a base to work from. They modify this to expand it out and show the management instead of three different user data objects.

tagged with: php5 tutorial destructor manage multiple object data

DevShed:
Keeping Track of Objects when Using Destructors in PHP 5
0 comments :: posted Wednesday January 30, 2008 @ 11:19:00
voice your opinion now!

Devshed continues their series looking at the use of destructors in PHP5 applications with part three, a method for keeping track of objects you've created during execution.

In this third part of the series, I'm going to show you how to retrieve some useful information about a specific object, including its properties and methods, prior to its being destroyed by the PHP parser via the implementation of a simple destructor.

Their new user class extracts the details about each of the objects right before they're destroyed via a call to get_object_vars and a loop to display the property and its value.

tagged with: php5 destructor object track property

DevShed:
Implementing Destructors with Multiple Objects in PHP 5
0 comments :: posted Wednesday January 23, 2008 @ 14:57:00
voice your opinion now!

DevShed has posted part two in their series looking at the use of destructors in PHP5. This time they focus on their use with multiple objects inside of an application.

Destructors can be used in all sorts of clever ways in the context of a given PHP 5 application, mostly in those cases where it's necessary to keep track of the status of certain objects prior to their being destroyed by the PHP interpreter. In this second chapter you'll learn how to work simultaneously with multiple classes that concretely implement their respective destructors.

They revisit their previous example with a simple class that's then extended to allow the flexibility to call the same destructor on multiple instances.

tagged with: destructor class user data multiple tutorial


framework application cakephp ajax releases zendframework developer database PEAR package book security zend conference mysql pecl job release code PHP5

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework