PHPTools

Chris McMacken took the initiative one day to start a repository on github where a bunch of us PHP developers could add our useful bits of code and turn it into something useful and able to be shared with others.  There's not a lot of web-based documentation in the repository but this site is here to help.

What is available in the repository?

DB - A database-agnostic abstraction layer designed to create SQL for you.

DependencyInjectionContainer - Help reduce class coupling, singleton use, and duplicate class instantiation code.

Dump - A way to show variables like print_r(), var_export(), and var_dump() but a little more helpful.

Friend - Get at another class's private and protected methods and properties.  Great for testing.

Logger - A simple class for logging various types of messages.

Session2 - An update to PHP's session functions.

Tokenizer - A class to consistently format tokenized PHP code and navigate the tokens.

WebRequest - A safer alternative to the $_GET, $_POST, and $_REQUEST superglobals.

How do I get it?

For those of you who are familiar with git, you merely need to clone his github repository:

git clone https://github.com/chrismcmacken/phptools.git

If you are new to git, I would suggest reading the Official Git Tutorial because it does a really good job of explaining things.  There's more on our git page if you want to read up about this great source code management tool.