Download the PHP package innmind/rest-bundle without Composer

On this page you can find all versions of the php package innmind/rest-bundle. 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 rest-bundle

RestBundle

Scrutinizer Code Quality Code Coverage Build Status

SensioLabsInsight

Wrapper for the innmind/rest-server library allowing you to easily expose a REST L3 API.

This bundle offer a complete integration of the library in a symfony project. It also add a new feature called server capabilities; put simply, it expose a route OPTIONS * that will output the list of routes exposed via this bundle. The goal being to allow client discovery, you could imagine a REST client that could prefetch all the resources definitions so it could know in advance if the resources it will try to send match the definitions.

Installation

Enable the bundle by adding the following line in your app/AppKernel.php of your project:

Then specify your resources in the configuration under:

Server

Storage

To define a storage you can create a service having either innmind_rest.server.storage.abstract.doctrine or innmind_rest.server.storage.abstract.neo4j as parent. Then you need to specify the first argument to construct the service, being an instance of an entity manager (a doctrine or neo4j one); and flag the service with the tag innmind_rest.server.storage, the bundle will look for the attribute alias on this tag to use as reference afterward (name used to specify storage on your resources).

Formats

As allowed formats are handled via encoders, you declare new ones with a tag on the encoder service you want to add.

Example of the built-in json format:

Events

In most cases the only event you'll want to alter will be KernelEvents::RESPONSE or Events::{STORAGE}_READ_QUERY_BUILDER (STORAGE can be DOCTRINE or NEO4J) to add restriction on the query like for example the user being connected.

You can look at Events.php to review all the events you have at your disposition.

Client

To consume an API you need to use the innmind_rest.client service. Examples of usages:

You can use $server->getResources() to view all the resources exposed by the server API; it will return an associative array with the names as keys and the definitions as values.


All versions of rest-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
innmind/rest-server Version ~2
symfony/http-kernel Version ~2.7|~3.0
symfony/dependency-injection Version ~2.7|~3.0
symfony/config Version ~2.7|~3.0
symfony/framework-bundle Version ~2.7|~3.0
innmind/rest-client Version ~2
symfony/filesystem Version ~2.7|~3.0
innmind/url-resolver Version ^1.0
guzzlehttp/guzzle Version ~5.0
symfony/console Version ~2.7|~3.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 innmind/rest-bundle contains the following files

Loading the files please wait ....