Fix order of class definition

As indicated in the documentation on inheritance, PHP 
requires that classes be defined before they are used.
In terms of a class that extends another class, the 
parent should be defined before the child. Earlier 
versions of PHP (and indeed the current version) may 
have been lenient on this point, but most opcache 
engines enforce the stricter ordering requirement.

@url http://www.php.net/manual/en/language.oop5.inheritance.php
Merge pull request #12 from bsweeney/master

Fix order of class definition