Fernando Bassani’s Blog: Avoiding the usage of global variables

Original post provide by PHP Freaks

Fernando Bassani has posted an alternative to using globals in your scripts creating global objects with the help of the Registry design pattern.

For a long time, the programming good practices tell us to avoid globals. In fact, this is a point of a large criticism in languages such as PHP. A nice solution to our global’s needs is the Registry design pattern. With it, we can have a repository with the data that has to be accessible, removing them from the global scope.

Included in the post is all the code you’ll need to get it to work. It uses a Singleton to grab the latest object and allows you to store values and define namespaces to keep data separate.

Previous Articles:
Mike Willbanks' Blog: E-Commerce Frameworks?
So here is my question, besides the really shitty shopping cart objects out there is there any true components for a framework that utilizes this functionality? I say shitty shopping cart objects because just about every single open source PHP shopping cart has some of the worst design aspects I have ever seen.
The Bakery: Setting Up Eclipse To Work With Cake
This tutorial gathers lots of information already out there, adds a bit of my own, and puts in all in one place. They work through the installation, how to define a workspace for your project and getting the bake command to work directly from the local software.
Zend Developer Zone: OSCON '07 Wrapup
In the wake of this year's OSCON, Cal Evans has posted his PHPcentric wrapup over on the Zend Developer Zone: The echoes from the last OSCON parties haven't even stopped reverberating though the halls as the next convention moves in. The vendors are all long gone and the attendees are all shoved in tiny seats on their express flight back to the real world.
Secunia.com: Joomla! Multiple Vulnerabilities
content management system: Some vulnerabilities have been reported in Joomla!, which can be exploited by malicious people to conduct session fixation attacks, crosssite scripting attacks or HTTP response splitting attacks. The issues are marked as less critical but users should still update to the latest version to avoid these issues: Certain unspecified input passed in com_search, com_content and mod_login is not properly sanitised before being returned to a user Input passed to the url parameter is not properly sanitised before being returned to the user.
Sebastian Bergmann's Blog: Wanted: PHP Implementation Of Unified Diff
Sebastian Bergmann has posted a wanted sign over on his blog he's looking for a PHP function to do two things: takes two strings as its input and returns a string with the differences between the two string in the same format as GNU diff would return for diff u for two files that contain the respective strings.
More Articles:
Internet Super Hero: PHP: Mysqlnd And Its Tests
The rest of the post is dedicated to how it was all set up: implemented as phpt Tests which need new settings Using runtests.php to run the tests Failing tests Useful runtests.php options and features They also briefly mention what a typical set of test results are (for the time the post was made).
Mysqlix
Package: mysqlix Summary: Manage MySQL database tables Groups: Databases, PHP 5 Author: Anton Rifco Description: This class can be used to manage MySQL database tables. It extends the MySQLi base class to add new functionality like: - Inserting, updating and retrieving MySQL table rows from a list of parameters - Creating and dropping databases, tables and triggers - Adding table columns - Retrieving table comments This class contains functions to manage mySQL database, like create (trigger, db, table), drop(trigger, db, table), insert, select, secure your defined transaction, get table comments, and other.
What’s In Your Toolkit?
After suffering through an inordinate number of “Whats in Your Wallet” commercials, I decided to share a few key components of my toolkit. No they do not involve faries, princesses, dragons or wierd looking centaur things. Anyhow, at the top of my chest of tools is: Fiddler: when dealing with modern applications with significant amounts of remote requests (aka AJAX) having a tool that can enumerate and expose these is oftentimes key to tell a developer why some component is failing.
What’s In Your Toolkit?
External stakeholders can view the applications as they live, while external developers can gain secured access to the boxes using PPPTP VPNs. Virtual Server: There is a lot of hype, and many outstanding questions, surrounding virtualization in production.
OperacaoData
Package: OperacaoData Summary: Perform operations with dates and periods Groups: PHP 5, Time and Date Author: André Lourenço Pedroso Description: This class can be used to perform operations with date and periods. It can take a given date and perform these operations: - Validate the date format - Add days, months or years - Calculate the difference between two dates The code and the comments are in Portuguese.

Leave a Reply