News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

Mikko Koppanen's Blog:
Fill patterns
0 comments :: posted Tuesday April 29, 2008 @ 15:24:50
voice your opinion now!

Mikko Koppanen has a quick post today showing how to use PHP and Imagick to create an image of text filled with another image layer behind it:

The fill pattern is used to annotate text but the named pattern could also be used to fill any shapes that allow fill to be specified (include circles, ellipses, rectangles, polygons etc etc).

His example is pretty simple (with a "Hello World!" output) that pulls in the background image, creates the composite layer over it, adds the text to it and sets the fill to the background image's layer. The whole this is wrapped up and output as a PNG file.

tagged with: fill pattern imagick tutorial example png background image


Sebastian Bergmann's Blog:
Support for the Cancel Case Workflow Pattern
0 comments :: posted Friday January 25, 2008 @ 09:45:00
voice your opinion now!

Sebastian Bergmann has a post about a new feature of the Workflow component in the eZ Components libraries - the Cancel Case Pattern.

Version 1.2 of the Workflow component that is part of the eZ Components adds support for the Cancel Case workflow pattern:

Once this Workflow pattern is called the complete Workflow instance is removed from the current execution (including any running nodes). You can find out more about the ezWorkflowNode in their documentation.

tagged with: cancel case workflow pattern ezcomponents

SitePoint PHP Blog:
Tokenization using regular expression sub patterns
0 comments :: posted Friday January 18, 2008 @ 11:15:49
voice your opinion now!

On the SitePoint PHP blog there's a new post from Harry Fuecks talking about a replacement method using token that works a bit better than the typical regular expression method.

Promtped by a real world example, one often-overlooked feature of most regular expressions engines is how subpatterns can useful to whip up tokenizers relatively easily. The problem? I needed to match the word any of the words "Canton", "Region" or "Group" in a string and perform a follow up action depending on which matched.

His ultimate solution used a set of preg_match generated tokens to do the replaces a bit more reliably. It also makes it easy for other scripts (like his Python example) to use them too.

tagged with: regularexpression pattern token replace

Tobias Schlitt's Blog:
Avoid an endless pifall
0 comments :: posted Thursday February 15, 2007 @ 09:03:00
voice your opinion now!

Tobias Schlitt has provided a helpful hint for developers working with lots of objects, methods, and singleton patterned functionality to keep out of the same trouble he faced.

During my current exam phase I'm working on some tiny private project to relax after learning. In there I'm using a main controller class, which implements a singleton pattern and initializes several sub-controllers while being created. The singletons purpose is, that the other controllers can access to main controller and its functionality whenever they need, without storing a reference each.

The problem with the code (he gives snippets) was a recursive loop that was suddenly appearing. He finally tracked it down to a constructor in another class that was accessing the main controller's constructor. The issue was that the constructor was never finishing up, so a valid instance wasn't returned, so the whole thing started all over again.

tagged with: singleton pattern object nested constructor controller singleton pattern object nested constructor controller


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

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