News Feed
Sections




News Archive
feed this:

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

Nikita Popov's Blog:
Understanding PHP's internal array implementation (Part 4)
March 29, 2012 @ 09:16:02

Nikita Popov has posted the fourth part of the "PHP's Source Code for PHP Developers" series he and Anthony Ferrara have been posting. In this latest article in the series, Nikita looks specifically at PHP's array implementation and how it's handed "behind the scenes".

Welcome back to the fourth part of the "PHP's Source Code for PHP Developers" series, in which we'll cover how PHP arrays are internally represented and used throughout the code base.

He starts with an obvious foundation: "everything's a hash table" (even properties, classes and yes, arrays). He describes what a hash table is and talks about two of the most commonly used versions of it in the PHP source - HashTable and Bucket. He gets into their usage a bit and compares this to the corresponding PHP code that uses a standard array.

0 comments voice your opinion now!
source code developers language internal array hashtable bucket


Project:
Google Storage Plugin for CakePHP
July 14, 2011 @ 11:03:21

Jonathan Bradley has submitted a handy new helper for the CakePHP users out there that can help to work with Google's Storage in a drop-in plugin - the Simple Google Storage Plugin for CakePHP.

Ever noticed how there is no decent support for CakePHP to utilize Google Storage? Well the wait is over, after realizing that Amazon S3 was just way to unreliable and bloated with spammers and usuage hogs. You can now add Google Storage support to your CakePHP application.

Obviously you'll need to be set up with Google Storage before using it, but the tool makes it as simple as calling publish() to push the data out, return all of the bucket information for your account and pull out information about individual objects. There's also a method that lets you make new buckets on the fly to make categorization simpler.

The heart of the code lies in the Storage class, so if you want to see how it's done, check that first. Other frameworks have their own interfaces with the Google services too, like the Zend Framework's Zend_GData component.

1 comment voice your opinion now!
google storage cakephp plugin bucket file


SitePoint PHP Blog:
Introducing Bucket A Minimal Dependency Injection Container for PHP
May 11, 2009 @ 07:58:04

On the SitePoint PHP blog Troels Knak-Nielsen has posted about a new tool he's whipped up to handle dependency injections - Bucket.

I got fed up with the lack of a decent DI-container for PHP, so today I created Bucket. To be clear, what I think is wrong with the currently available containers (at least that I'm aware of) is that they either are unstable, abandoned, require a lot of up-front configuration in external XML-files, or are tightly integrated into some full-stack framework. I had my hopes up for Phemto for a while, but it seems that progress has stalled.

He includes a few bits of examples code in the post showing how to use type hinting, the factory method, callbacks and its support for child scopes. If you'd like to check it out for yourself, you can clone it from github.

0 comments voice your opinion now!
dependency injection bucket container github


Maggie Nelson's Blog:
NTILE() - easy way to generate tag clouds
April 29, 2008 @ 13:44:01

For the Oracle users out there looking for an easy way to pull those tags together and make a handy little cloud out of them, Maggie Nelson has posted about a simple Oracle function that can help - NTILE.

For example, check out the documentation for the NTILE Function. Yeah, sounds kind of boring. What good could it be in the wonderful world of web development? After all, who manages employee or sales tables anymore... Answer: generating tag clouds.

Her SQL statement categorizes the tags for you automatically, dropping them in to "buckets" of font sizes. This makes it simple to loop through them (like with a foreach) and output your tags with a little help from some CSS. You can even specify how many buckets you want it to fill (how many different tag values to get and compare).

0 comments voice your opinion now!
ntile tag cloud tutorial oracle sql order bucket



Community Events





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


release series list tips framework update podcast community deployment laravel install language opinion introduction api symfony package zendserver interview library

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