 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Alexander Netkachev's Blog: Practical PHP events
by Chris Cornutt October 24, 2006 @ 07:20:48
In his latest tutorial, Alexander Netkachev shows how to, with some of the simple PHP functions, create an event system for your script, complete with callbacks.
The way how events are raised and how listeners are attached on the events is a part of a core in many modern applications. It plays an important role in some enterprise design patterns (MVC, for example).
He starts with the basics of event handling - some of the terms and descriptions of basic functionality that any good event handler would have. He describes the most common setup of an event-interaction relationship. Then, it's on to the code, showing first three different ways to call functions (by name, by variable, and by callback).
He finishes it off with a functional example that responds to a a call to fireEvent (five times) and handles each by calling the function in the callback information (myFunction).
voice your opinion now!
event handline callback tutorial basics calling methods event handline callback tutorial basics calling methods
DevShed: Finding Paths, Timestamps and More with the DirectoryIterator Class in PHP
by Chris Cornutt September 18, 2006 @ 08:21:51
DevShed continues its look at the DirectoryIterator functionality in PHP5 with the second part of the series today - "Finding Paths, Timestamps and More with the DirectoryIterator Class in PHP".
Are you interested in having at your disposal a quick reference for working with the "DirectoryIterator" class that comes with PHP 5? Then this might be the article that you've been waiting for! Welcome to the second tutorial of the series "A Close Look at the DirectoryIterator Class in PHP 5." Over the course of this set of installments, you'll find complete coverage of the most important methods bundled with this class, and learn how to take advantage of their excellent functionality.
They cover even more functions in this part:
- rewind, current, valid
- getFileName, isFile
- getMTime, getATime, getCTime
- getPath, getPathName
Each set is supported by code and explaination to help introduce their concepts in a useful way.
voice your opinion now!
tutorial directoryiterator methods part2 path timestamp file tutorial directoryiterator methods part2 path timestamp file
DevShed: Classes as PHP Functions
by Chris Cornutt August 09, 2006 @ 05:49:25
Continuing on in their "PHP functions" series today, DevShed has posted this next step up the ladder, getting more advanced with the functions they're working with. This time, there's a focus on functions inside classes and creating the classes around them (a sort of introduction to object-oriented programming).
Continuing our PHP functions article, we move on to creating classes. Let me say right at the start that you can write perfectly effective and useful PHP code without creating classes or going into object oriented programming. Object oriented programming can be very powerful and PHP programmers are increasingly taking advantage of these capabilities, which have been greatly expanded since PHP4.
They start with the creation of a simple class - a human class with two $legs and two $arms. They show a simple display of this data and add another attribute to the class, one for hair color. They then capture the output they've been creating inside a function, report, and show how to execute it. Finally, they show how to use the special function that runs when the object is created - the constructor.
voice your opinion now!
classes functions methods properties tutorial part2 classes functions methods properties tutorial part2
DevShed: Implementing Additional Methods with mysqli and PHP 5
by Chris Cornutt July 10, 2006 @ 07:22:54
DevShed has posted part three of their popular "using mysqli in PHP5" series today, this time, they focus on increasing the functionality of the code they started last time with other mysqli methods.
I must say that the "mysqli" extension offers an impressive set of features, which can be implemented right from the very beginning. However, and speaking of its cool features, in the next few lines, I'm going to show you a few more. Over the course of this last tutorial, I'll be covering some other methods and properties, mainly aimed at finding the IDs after inserting new rows, and obtaining information about specific table fields.
They touch on the fetch_array, data_seek, fetch_assoc, fetch_field, and fetch_seek functions, giving examples and other assicated properties along the way.
voice your opinion now!
mysqli mysql additional methods php5 tutorial mysqli mysql additional methods php5 tutorial
|
Community Events
Don't see your event here? Let us know!
|