News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sean Coates' Blog:
PHP Dashboard Widget
June 05, 2007 @ 10:13:00

Picking back up on his blog, Sean Coates shares a Dashboard widget he's created to do quick and dirty PHP interpreting on the fly:

I found myself using php -r on the command line to test some simple code snippets, and it occurred to me that this isn't "The Mac Way." So, following the excellent documentation at Apple, I managed to come up with something pretty useful in an afternoon.

His widget sits happily, ready to take in PHP code and output the result at the click of a button.

1 comment voice your opinion now!
dashboard widget interpret macosx dashboard widget interpret macosx


phpaddiction:
Url Routing with PHP - Part Two
April 06, 2007 @ 08:41:00

On the phpaddiction site today, there's part two of their tutorial looking at URL routing with PHP (started here in Part One).

With the foundation of the routing in place (from part one), they move on to bigger and better things:

  • assign responsibilities (what needs to be accomplished)
  • creating a standard command object
  • interpreting the URLs and the parameters passed in it
  • using this information to dispatch the correct commands
There's code examples through out to illustrate each point as well as one main one at the end to show how to put it all into action. Their script reads in the URL and sends the command along to the CommandDispatcher - check out this example page to see it in action.

0 comments voice your opinion now!
url routing tutorial command object interpret dispatch url routing tutorial command object interpret dispatch


Elizabeth Smith's Blog:
String Class (Kal_String)
February 01, 2006 @ 06:48:47

On her blog today, Elizabeth Smith has this new post highlighting a string class that she's created to overload the basic PHP types to handle multibyte or translated strings.

So my rather cumbersome three classes to handle translation and charsets is now ONE class. When the rest of the magic __toString stuff goes into php (estimated for 5.2, which I wouldn't know if I didn't read internals religiously) it makes it even easier to use.

Kal_String is the class itself. Basically it has TWO constructors - because there are a series of static settings and two static methods that deal with things like a default charset to use for all strings and a default language to look for. The language searching is set up with a callback - so you can write your own class using gettext or including straight php files or whatever you want. You can even manually load in translation strings for individual string instances if you're so inclined.

She gives examples of how to use the class, everything from just a simple output to the use of some of the more advanced "interpretation"-based features.

0 comments voice your opinion now!
string class simple output interpret multibyte overload string class simple output interpret multibyte overload



Community Events











Don't see your event here?
Let us know!


component podcast symfony2 language opinion facebook introduction overview performance unittest application hack security framework hhvm package install composer support release

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