Commit Graph

13 Commits

Author SHA1 Message Date
PJ Dietz c51577a43a Clean up comments. Remove trailing comments after functions and classes, etc. 2012-12-04 14:33:25 -05:00
PJ Dietz c970eee4bb Add protocol and protocolVersion members and their accessors. 2012-12-04 14:27:52 -05:00
PJ Dietz b3f997136f Made Response->statusCode into a property and added ->reasonPhrase.
PhpDoc updates.

When you set the ->statusCode to a standard HTTP status code, the instance will set the reason phrase appropriately. You may also set statusCode and reasonPhrase separately, or set them at once by passing two parameters to setStatusCode();
2012-11-30 16:33:04 -05:00
PJ Dietz 7ee4ee39b9 Base Request and Response off of base class Message 2012-11-29 16:58:14 -05:00
PJ Dietz bb44b27787 Fix comments. Work on sample scripts. 2012-11-29 15:47:10 -05:00
PJ Dietz 87a3c063da Added Response::getStatusLine() function. This makes it more extensible and compatible with PHP 5.3. 2012-10-01 20:06:14 -04:00
PJ Dietz ef31fd7292 Router can return a default 404 response when no routes match the request.
Add functionality to Request to carve up a URI and set the corresponding members.
2012-09-23 18:43:52 -04:00
PJ Dietz 5af80d8b1d Move some logic from Router to Route for easier subclassing and better OOP principles. Add comments and PHPDoc blocks. 2012-09-16 22:31:25 -04:00
PJ Dietz 37b75d69d1 Commenting and tidying. 2012-09-08 19:46:11 -04:00
PJ Dietz 44b6e9b118 Change the way Handler goes about building the response. This now happen in the constructor, and Handler::getResponse() returns the Response instance instead of using Handler::respond to trigger the response. 2012-09-08 16:56:54 -04:00
PJ Dietz 81dd2c3f1c Add Response class for building HTTP responses. 2012-08-23 15:39:12 -04:00
PJ Dietz 0c94052d78 Build Request class to provide the following items from the HTTP request:
- body
- headers
- method
- path
- query

The Request also has a static method to return a reference to a singleton instance representing the current request.
2012-08-23 14:34:15 -04:00
PJ Dietz 76cde65046 Added dummy files. 2012-08-20 21:00:25 -04:00