Download the PHP package 360i/sonno without Composer
On this page you can find all versions of the php package 360i/sonno. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package sonno
Sonno - A RESTful PHP Framework!
Sonno is a lightweight PHP framework based loosely on Jersey, a Java ReST framework reference implementation of the JAX-RS specification.
Plain-Old-PHP objects are configured with a set of annotations describing a set of Resources.
License
Sonno is licensed under the New BSD license. A copy can be found here: http://sonno.360i.com/LICENSE.txt
Dependencies
The current version of Sonno supports configuring a ReSTful web application via annotations. Rather than reinvent the wheel and develop our own annotation reader, we've provided interfaces and adapters. The adapter that ships with this version uses Doctrine-Common version >= 2.1.1. That's not to say that any developer couldn't implement their own annotation reader, then build an adapter that implements Sonno\Annotation\Reader\ReaderInterface.
Here's an example of how a Sonno application can be configured using Doctrine's annotation reader:
Summary of Annotations
Annotation | Target | Description |
@Path | Class, Method | Specifies a relative path for a resource. When used on a class this annotation identifies that class as a root resource. When used on a method this annotation identifies a sub-resource method or locator. |
@Consumes | Class, Method | Specifies a list of media types that can be consumed. |
@Produces | Class, Method | Specifies a list of media types that can be produced. |
@Context | Property | Identifies an injection target for a Request object. |
@DELETE | Method | Specifies that the annotated method handles HTTP DELETE requests. |
@GET | Method | Specifies that the annotated method handles HTTP GET requests. |
@HEAD | Method | Specifies that the annotated method handles HTTP HEAD requests. |
@OPTIONS | Method | Specifies that the annotated method handles HTTP OPTIONS requests. |
@POST | Method | Specifies that the annotated method handles HTTP POST requests. |
@PUT | Method | Specifies that the annotated method handles HTTP PUT requests. |
@PathParam | Method | Specifies that the value of a method parameter is to be extracted from the request URI path. The value of the annotation identifies the name of a URI template parameter. |
@QueryParam | Method | Specifies that the value of a method parameter is to be extracted from a URI query parameter. The value of the annotation identifies the name of a query parameter. |
@CookieParam | Method | Specifies that the value of a method parameter is to be extracted from a HTTP cookie. The value of the annotation identifies the name of a the cookie. |
@FormParam | Method | Specifies that the value of a method parameter is to be extracted from a form parameter in a request entity body. The value of the annotation identifies the name of a form parameter. Note that whilst the annotation target allows use on fields and methods, the specification only requires support for use on resource method parameters. |
@HeaderParam | Method | Specifies that the value of a method parameter is to be extracted from a HTTP header. The value of the annotation identifies the name of a HTTP header. |
Contribution Guidelines
Coding Standard
We strictly adhere to the Zend Framework coding standard. Before pushing to the
origin, you should run
PHP_CodeSniffer:
$ phpcs --standard=zend src
. All errors and warnings
should be cleaned up before making a pull request.
Add Test Cases
We try to keep our Code Coverage high and our CRAP index low. Before submitting a pull request, run the PHPUnit test suite and ensure that all tests pass. If you add functionality or fix a bug, please include test cases to cover the code you've sumitted.