Updated API. Added @method phpdoc to reveal API methods for IDEs and the like.