Commit Graph

29 Commits

Author SHA1 Message Date
PJ Dietz 566384f1e4 Promote Response::getStatusLine() to public
Fix issue where response phrase was not set in Response constructor.
2014-04-07 16:25:22 -04:00
PJ Dietz 8049635837 Add ability to read response body from a file without reading the entire file into memory 2014-03-19 15:13:29 -04:00
PJ Dietz a756adf933 Update RequestInterface to inherit from RouteableInterface 2013-08-25 23:05:13 -04:00
PJ Dietz e3e98377c3 Track route depth on the Request, not on the Router.
This allows a Handler to use the top-level router and have the depth count match the depth for the current request, not the total.
2013-08-16 18:59:05 -04:00
PJ Dietz d91ac12541 Add safeguard against infinite routing loops 2013-08-16 17:49:37 -04:00
PJ Dietz 6013198436 Allow Routers to dispatch additional Routers
- RouterInterface and HandlerInterface now share a parent, RouteTargetInterface.
- A Router may now be used as the target for a Route.
- Route's handler member is not replaced by Router's target member.
- Route::getHandler() and Route::setHandler() are deprecated and alias getTarget() and setTarget()
2013-08-16 16:51:09 -04:00
PJ Dietz dbd4ff96a5 Split response into headers and body based on the size of the headers cURL reports.
Fixes an issue with 100 Continue status codes, etc. where r\n\r\n appears within the list of headers.
2013-08-14 10:47:02 -04:00
PJ Dietz fef677168e Allow Request::readHttpRequest to work when apache_request_headers is not available. 2013-06-12 19:54:08 -04:00
PJ Dietz e693e138d0 Add support for OPTIONS and generate Allow header from Handler. Close #4 2013-05-27 14:13:16 -04:00
PJ Dietz fafce16e9e Update README. Add default 500 error to Router. Close #3 2013-05-27 12:59:55 -04:00
PJ Dietz 8aae07660c Add port to Request class. Allow user to supply cURL options. Close #2
Caller can now supply array of options for use with curl_setopt_array() when calling Request::request()
2013-05-26 18:32:26 -04:00
PJ Dietz 98e04ab63b Define interfaces more clearly and clean up code. 2013-05-26 14:55:48 -04:00
PJ Dietz ac752bb446 Add interfaces for requests and responses 2013-05-23 20:26:32 -04:00
PJ Dietz b28b53aa11 Add interfaces for Route and Handler 2013-05-23 19:49:43 -04:00
PJ Dietz 47ec8f5f96 Code cleanup and refactoring 2013-05-19 12:59:57 -04:00
PJ Dietz 3018d4c660 Fix typo 2013-03-29 14:00:45 -04:00
PJ Dietz 9863bee7f5 Set headers and headerLookup arrays in Message::__constructor to prevent warning 2013-03-29 13:53:51 -04:00
PJ Dietz 972f8e9c26 Update Request and Response
Add constructor for Request to provide URI and method on instantiation.
Add success property and getSuccess() method Response.

Closes #1
2013-03-26 21:05:36 -04:00
PJ Dietz d0ef6a62fb Updates to documentation for better documentation generation
Refactored WellrestedException to WellRESTedException
2013-01-29 20:59:55 -05:00
PJ Dietz 4285636088 Merge branch 'master' of git://github.com/pjdietz/WellRESTed
Conflicts:
	src/pjdietz/WellRESTed/Message.php
2013-01-28 22:24:54 -05:00
PJ Dietz e419aaba7d Add page-level doc blocks to each script
Update comments
Update magic accessors
Update accessor and add islet and unset methods
2013-01-28 22:15:33 -05:00
PJ Dietz 1bad8e35a0 Send headers when making a request.
Add headerLines property to Message
Remove invalid default value for protocol in Response
2013-01-28 15:53:18 -05:00
PJ Dietz a44c98efb3 Fix error in Request.php where wrong namespace was used for Exceptions
Remove sample APi
2013-01-27 18:07:07 -05:00
PJ Dietz 871f76f008 Update documentation
Add config file for Doxygen
2013-01-27 14:14:45 -05:00
PJ Dietz 22db41c0e5 Rename Exceptions directory to match namespace spelling. 2013-01-27 10:03:22 -05:00
PJ Dietz 298bdab35f Update Router and Route to require autoloading
Update samples to use new Router and Route
Refactor ApiSample namespace
2013-01-24 21:48:44 -05:00
PJ Dietz 8597b9be06 Refactor for better PSR compliance. Still need to finish with samples. 2013-01-24 21:27:57 -05:00
PJ Dietz 3ff2371edd Make specifying the path to the handler script optional in Route since it is not needed if using an autoloader. 2013-01-10 21:21:57 -05:00
PJ Dietz 331bdae7ec Refactor library files into src/pjdietz/WellRESTed 2013-01-10 20:54:22 -05:00