Download the PHP package kleijnweb/php-api-routing-bundle without Composer

On this page you can find all versions of the php package kleijnweb/php-api-routing-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 php-api-routing-bundle

This project is no longer maintained

KleijnWeb\PhpApi\RoutingBundle

SensioLabsInsight

Build Status Coverage Status Scrutinizer Code Quality Latest Unstable Version Latest Stable Version

Install And Configure

Install using composer (composer require kleijnweb/php-api-routing-bundle).

Add OpenApi (or RAML) routing to your app, for example:

The type as well as the php-api prefix mentioned below is configurable:

Routing

To view the routes added by PhpApi\RoutingBundle, you can use Symfony's debug:router. Route keys include the API spec base filename to prevent collisions. For path parameters, PhpApiRoutingBundle adds additional requirements to the routes. This way /foo/{bar} and /foo/bar wont conflict when bar is defined to be an integer. This also supports Swaggers pattern and enum when dealing with string path parameters.

Controller Resolution

All controllers must be defined as services in the DI container. PhpApi\RoutingBundle sees an operation id as composed from the following parts:

Router is a DI key namespace in this context. The router segment defaults to php-api.controller, but can be overwritten at the Path Object level using x-router:

The controller segments defaults to the resource name as extracted from the path by convention. For example, for path /foo/something the default router + controller would be: php-api.controller.foo.

You can override the whole of [router].[controller] using x-router-controller. This will not only override the default, but any declaration of x-router, too:

The following is also supported (set controller for a specific method):

Finally, the method segment defaults to the HTTP method name, but may be overridden using Swagger's operationId or x-router-controller-method. Note the Swagger spec requires operationId to be unique, so while operationId can contain only the method name, you're usually better off using x-router-controller-method. You can also use a fully qualified operation id using double colon notation, eg "my.controller.namespace.myresource:methodName". Combining x-router or x-router-controller and a qualified operationId ignores the former.

Contributing

Pull request are very welcome, as long as:

License

KleijnWeb\PhpApi\RoutingBundle is made available under the terms of the LGPL, version 3.0.


All versions of php-api-routing-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0.0
psr/log Version ^1.0
symfony/dependency-injection Version >=2.8.7
symfony/config Version >=2.8.7
symfony/event-dispatcher Version >=2.8.7
symfony/http-foundation Version >=2.8.7
symfony/http-kernel Version >=2.8.7
symfony/filesystem Version >=2.8.7
symfony/routing Version >=2.8.7
symfony/yaml Version >=2.8.7
symfony/finder Version >=2.8.7
symfony/property-access Version >=2.8.7
doctrine/collections Version ^1.3
doctrine/cache Version ^1.6
kleijnweb/php-api-descriptions Version ^v1.0.0-alpha4
kleijnweb/php-api-middleware Version ^v1.0.0-alpha1
kleijnweb/php-api-hydrator Version ^v1.0.0-alpha2
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 kleijnweb/php-api-routing-bundle contains the following files

Loading the files please wait ....