PJ Dietz
0bae1c1b48
Remove last file from samples. Remove Doxygen file.
2013-01-27 21:27:19 -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
PJ Dietz
3ab7b84a51
Remove ".inc" from filenames.
2013-01-10 20:28:57 -05:00
PJ Dietz
e4972e1bf0
Refactored namespace
...
Added autoload to composer.json
2013-01-10 20:09:07 -05:00
PJ Dietz
2f328bb5e8
Add composer.json
2013-01-10 19:45:55 -05:00
PJ Dietz
d4f62642e7
Add case insensitive lookup for headers gathered from the request made to the server.
2012-12-28 17:25:35 -05:00
PJ Dietz
40ca6bea87
Make field names for headers case insensitive.
2012-12-27 08:41:56 -05:00
PJ Dietz
06717be66f
Add to-do notes Request and Response.
2012-12-26 19:03:49 -05:00
PJ Dietz
471abda822
Refactor ArticleControler to ArticleController
...
Fix some typos
2012-12-24 08:42:44 -05:00
PJ Dietz
c788c9ee70
Move ArticleControler.php
2012-12-05 16:20:28 -05:00
PJ Dietz
2f3ced6b8d
Fix namespace error.
2012-12-05 16:11:12 -05:00
PJ Dietz
a2255bebd9
Namespace API sample.
...
Add and update comments.
2012-12-05 16:08:30 -05:00
PJ Dietz
ff331935d2
API Sample now supports minimal GET, POST, PUT, and DELETE actions.
2012-12-05 15:35:23 -05:00
PJ Dietz
e910418ab1
Add API Sample. Demonstration API using a route table.
2012-12-05 10:16:05 -05:00
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
85e51bbca9
Simplified samples.
2012-11-29 16:10:50 -05:00
PJ Dietz
bb44b27787
Fix comments. Work on sample scripts.
2012-11-29 15:47:10 -05:00
PJ Dietz
4d0fee6dc9
Remove the uri member variable from Request and make it a pure property.
...
Add setHeader() and hasHeader() methods to Request.
2012-11-29 15:40:05 -05:00
PJ Dietz
7c76ddb010
Fix comments.
2012-11-29 14:56:04 -05:00
PJ Dietz
34ed07f4a0
Updates to Request
...
Add client-side sample
2012-11-29 14:41:32 -05:00
PJ Dietz
0052ecd455
Add custom exceptions.
2012-11-29 14:40:46 -05:00
PJ Dietz
d168265700
Updates to Request class, including adding the request() method for cURL access to resources.
2012-11-27 16:57:27 -05:00
PJ Dietz
66be033022
Beginning to work on the client-side sample.
2012-11-27 12:25:53 -05:00
PJ Dietz
e5a085ff48
Add first sample.
...
Update PPP for one method.
2012-11-26 12:45:39 -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
4c0434399a
Code cleanup.
2012-09-16 22:44:29 -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
6664c73605
Added Handler, Router, and Route classes.
2012-09-03 14:02:49 -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
PJ Dietz
6a425c03d6
Initial commit
2012-08-20 17:34:37 -07:00