Adding PHPDoc blocks for every public methods (API).

Here's a commit adding PHPDoc blocks for every public method, which are like the library API. Don't hesitate to comment if some types are wrong or improve with more methods "textual" comments.