Download the PHP package level3/level3 without Composer

On this page you can find all versions of the php package level3/level3. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package level3

Level3 RESTful API builder Build Status

A RESTful API builder based on 3-level model (URI, HTTP and Hypermedia)

Read about 3-level model of restful maturity at:

Under heavy development

Requirements

Installation

Add level3/level3 to your composer requirements, you can see the package information on Packagist.:

Tests

Tests are in the tests folder. To run them, you need PHPUnit. Example:

$ phpunit --configuration phpunit.xml.dist

Documentation

Overview

Level3 only provides the handling of already parsed requests. These requests extend Symfony\Component\HttpFoundation\Request and add some extra functionality. You have to to create these requests from whatever delivery mechanism/framework you are using (see level3-silex for an example of how to do this using Silex).

These requests travel along a series of RequestProcessor instances that can authenticate, authorize and modify them. The last RequestProcessor is the AccessorWrapper. It knows how to translate a request into a call for the Accessor, and interpret the return of that call to turn it into a Response (which extends Symfony\Component\HttpFoundation\Response) object.

The Accessor is in charge of asking the RepositoryHub for the Repository in charge of handling the fetching of the requested resource and querying it.

The RepositoryHub knows what Repository is responsible of fetching each kind of resource based on the key.

The RepositoryMapper knows about Repositories and URLs.

Repositories have to be extended in order to implement the logic in charge of handling resources from the storage system.

Classes overview

Request and Response

Are the messages passed through a chain of RequestProcessors. They encapsulate all the business logic.

On the one hand the Controller handling the HTTP request has to create a Request object, but on the other hand, Level3 Response objects, in the case of using a Symfony based framework can be returned directly since they extend its Response implementation.

RequestProcessor

All subclasses are intended to handle the request, pass it to the next processor, get their response, handle it, and reuturn it. They can be chained in order to implement any kind of functionality. Some default are already provided as an example, since they can also be useful (you can read more about RequestProcessor here:

AcessorWrapper

Is the only mandatory RequestProcessor. It translates the request into a RepositoryFriendly format and generates a response from its response. If chained to others, this has to be the last one in the chain.

ExceptionHandler

Captures thrown exceptions and prints them in a convenient format, depending on the request headers. It also logs to a PSR3 Logger.

RequestLogger

Logs all requests to a PSR3 Logger.

AuthenticationProcessor

This class authenticates the request and sets proper credentials in order to, later, authorize or not the request. The way the authentication is handled is done using implementations of Level3\Security\Authentication\Method. By default, HMAC is used.

Read more about this here.

AuthorizationProcessor

Authorizes the request based on it's getCredentials() method. Several authorizators are provided:

By default, all request have anonymous credentials, so if no AuthenticationProcessor is chained before, this is what you can expect.

You can read more about AurizationProcesor here.

Repository

Is the one in charge of retrieving the data from the underlying storage and returning a Level3\Hal\Resource with some help from Level3\Hal\ResourceBuilder.

License

MIT, see LICENSE


All versions of level3 with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
shrikeh/teapot Version 0.2
symfony/http-foundation Version 2.3.*@dev
psr/log Version ~1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package level3/level3 contains the following files

Loading the files please wait ....