Posts filed under “Development”

Zend Framework Module Init Script (Controller Plugin)

Well, it’s been a while since I’ve done a PHP update hasn’t it? Well alls well here in CStat, I have a quickie for you folks. Recently at work I had the need to run a script before every single controller (namely to add a plugin folder to Dwoo) for a specific module that I [...]

Serialize Python Variables To PHP

So I’m in the planning stages of a project where I’ll probably be doing some heavy lifting in Python and serving up the output through PHP. Obviously this will entail transmitting data between Python and PHP and while I haven’t had a chance to do performance testing to see if it’s worth it to save [...]

Outputting CSV as a Downloadable File in PHP

Nearly every application you could write in for the business sphere in PHP probably requires some sort of data export, most likely in the CSV format. The easiest way to provide a downloadable file is by altering the headers and echo’ing the file content. In our case: <?php header(“Content-type: text/csv”); header(“Cache-Control: no-store, no-cache”); header(‘Content-Disposition: attachment; [...]

ImagePlane and some simple OOP designs

At Net Perspective we created an image editor in flash that we just released for sale called ImagePlane. While ImagePlane has already been creatively introduced and documented quite thoroughly, I wanted to go over some decisions concerning the PHP demo. Currently ImagePlane posts saved data to URL via the HTTP POST method. Currently ImagePlane posts [...]

Weird errors and XDebug to save the day!

I had an interesting (and by interesting I mean completely mindbogglingly frustrating) error that I cannot summarize. To start things off I notice to my dismay visiting a specific page on my website would result in a white screen (as would be expected for a fatal PHP error with error_reporting turned off). Problem is I [...]

Quickie: Module-specific Error Controllers in Zend Framework (1.5)

In my quest to do some alterations on ZF error handling (in particular, render the view if the action or controller is not found, makes it real easy for my designer to prototype) I had the desire to be able to allow modules to have their own ErrorControllers. Unfortunately, the Zend_Controller_Plugin_ErrorHandler() default does not allow [...]

Displaying N-Deep Trees (Remember Your Algorithms Course?)

Often times when doing web development one has the need to categorize things. And not only basic categorization, n-deep hierarchical categorization. I’ve already discussed storage and retrieval of such data, but there comes a time when one needs to display this information. Sometimes people build systems to only account for their current requirements. If the [...]

PHP Women Best Practice Contest Posts

I made a few posts to the PHPWomen.org Article Competition and felt I should share them here. I wrote three entries: Flash Your Errors: It’s Illegal In 28 States! on combining flash messages and error reporting David Copperfield Wasn’t This __magical: __autoload() is Awesome! on using the __autoload functions and PEAR style namespacing Path Secrets [...]

[Net Perspective Cross Post] Time is Money: Save Time With Automation And Phing

(Originally posted on my company’s blog) I’ve been talking a lot about automation as of late which led to my posting a generic, overload broad view of the tools and utilities I use here at Net Perspective. However, I wanted to go into detail about my real world uses of a particular tool, Phing.

PHP 5.3 and Closures

I’m fairly excited because as of only a week or so ago I found the closures rfc, and not only did I find that the rfc has a working patch, apparently it’s already in PHP 5.3. You see, apparently it’s not good enough that we get name spaces and late static binding, oh no, we [...]