News Feed
Sections
News Archive


Community Events






feed this:

PHP in Action Blog:
I want enums in PHP
0 comments :: posted Monday May 12, 2008 @ 08:41:16
voice your opinion now!
I want Enums in PHP

That's how this new post on the PHP in Action blog starts this morning. The one thing that he wants is enumeration support in PHP. He shows how it can currently come close with a "roles" system:

Useful examples I've encountered in web programming are states or stages in a process and user roles. Another kind of example is one I used in PHP In Action: an authorization system with three fixed roles or categories of user: regular, webmaster and administrator.

He sets up an example class that sets constants for the different access levels rather than just relying on strings to handle it (which, as he points out, could very easily be misspelled and not throw any kind of error) .

tagged with: enumeraction enum phpinaction multiple value constant


Zend Developer Zone:
PHP in Action - Chapter 7, Design Patterns. Part - III
0 comments :: posted Tuesday March 06, 2007 @ 12:13:00
voice your opinion now!

The Zend Developer Zone has posted the final part of their excerpts from the Manning Publishing book "PHP in Action" today with part three of the Design Patterns chapter.

You know you've been waiting for it, here it is. The final installment of Chapter 7 of PHP in Action by Dagfinn Reiersol. Without further comment, here's the introduction to this section in Dagfinn's own words: "In this section we discuss an Iterator and a Composite."

Dagfinn briefly mentions what the two patterns are about - a "canned loop" and making tree structures easy. Check out the PDF for the remainder of the chapter.

tagged with: phpinaction book excerpt manningpublishing pdf designpattern phpinaction book excerpt manningpublishing pdf designpattern


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

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