News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



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


SaniSoft Blog:
Multiple validation rules per model field while baking
0 comments :: posted Tuesday April 29, 2008 @ 16:12:44
voice your opinion now!

If you're a CakePHP user and have been frustrated by how this "bake" functionality doesn't allow for more than one validation rule on a given field, check out the new post on the SaniSoft blog (from Amit Badkas):

This is not much of a problem if you have only a few models but when you start to work on several dozen models in a project it becomes very tedious to open each and every model file to make changes.

The result of his frustration has come out in the form of a patch as a part of a new ticket in the CakePHP request submission process.

tagged with: bake cakephp framework multiple validation rule patch feature

Zend Developer Zone:
Using Zend_Feed to Merge Multiple RSS Feeds
0 comments :: posted Tuesday April 08, 2008 @ 10:32:58
voice your opinion now!

On the Zend Developer Zone, a new tutorial has been posted that anyone looking to "blend feeds" might want to take a look at. It's a guide to using the Zend_Feed component of the Zend Framework to combine the contents of multiple RSS feeds.

As part of my playing around with the Zend Framework, I've decided to make this merged RSS feed using the Zend_Feed component. Actually at the end I've realized that this merged feed idea is quite useless, but at least this post came out of it :-)

He developed it originally as a way to combine his twitter and blog feeds into one thing to provide the latest updates to readers from both in one simple place. He shows how to take in the two feeds, each in its own feed object and merge them into one array. This array is then pushed back out to the visitor an the RSS format (thanks to Zend_Feed_Rss).

tagged with: zendframework zendfeed zendfeedrss combine tutorial feed multiple

IBuildings Blog:
Multithreading in PHP with CURL
0 comments :: posted Tuesday April 01, 2008 @ 16:23:08
voice your opinion now!

As mentioned on the Zend Developer Zone, there's a new tutorial posted on the IBuildings blog (by Lineke Kerckhoffs-Willems) about performing some multi-threading magic in PHP with the help of cURL.

Each PHP request is a separate thread. There are some workarounds like using pcntl_fork, starting multiple commandline php processes using the exec command or even using ajax. Another possibility is using the Curl library. Besides the basic functions described above Curl offers the "multi" functions for retrieving content from several url's at the same time.

Examples are included showing how to make these "multi" requests via PHP's cURL support (calling URLs with a "seconds" value on the end).

tagged with: multithread curl example tutorial multiple request

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:
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

Bill Staples' Blog:
IIS7 Patch for Windows Vista fixes CGI/PHP apps - multiple response headers
0 comments :: posted Wednesday September 26, 2007 @ 11:18:00
voice your opinion now!

On his blog, Bill has posted about a patch for IIS7 running on a Windows Vista machine that corrects an issue with applications that send multiple response headers.

Today we released a patch for IIS7 in Windows Vista that addresses an issue we've seen with CGI applications (especially PHP applications that use the built-in CGI component). The typical symptom is an application that runs using CGI and is unable to support multiple "cookies" for authentication or personalization.

He also links to the Microsoft Knowledge Base article on the topic and to the download for the patch.

tagged with: iis7 patch windowsvista cgi application multiple response header iis7 patch windowsvista cgi application multiple response header


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

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