Stack.PHP 0.4 Released!

Written for Stack.PHP by Nathan Osman on 2011-12-09

Stack.PHP 0.4 has been released! This version is a total and complete overhaul of the entire library to make way for some new changes. Instead of offering classes grouped by API method category, Stack.PHP now offers a flexible hierarchy of classes that support chaining. This means that you can build your API request by appending methods to the end of a request object. There is a method for every single path element and parameter in the entire API.

The request classes are not the only addition, however. You also get an extremely flexible response class that allows you to step through multiple pages of data transparently without worrying about page numbering. Worried about request throttling? No problem - that feature is built into Stack.PHP.

The library also comes with two caching classes that use an SQL database and filestore to cache responses received from the API. Both classes take care of storage, retrieval, and cleanup so that you don't have to. If neither of these classes suit your needs, simply derive from CacheBase and implement your own class.

If all of that weren't enough, Stack.PHP offers some output helpers for web applications - you can generate a list of sites, a table of users sorted in various ways, and even offer your users an easy way of identifying themselves.

As was the case with previous versions of Stack.PHP, the classes and methods are fully documented. Stack.PHP has switched to Doxygen for generating documentation now and this means a very nice-looking set of HTML pages you can browse.

Get started with Stack.PHP today!

Read all announcements