Download the PHP package knplabs/rad-resource-resolver without Composer

On this page you can find all versions of the php package knplabs/rad-resource-resolver. 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 rad-resource-resolver

DEPRECATED

Unfortunately we decided to not maintain this project anymore (see why). If you want to mark another package as a replacement for this one please send an email to [email protected].

Knp Rad Resource Resolver

Build Status Scrutinizer Code Quality Latest Stable Version Total Downloads Latest Unstable Version License

Official maintainers:

Why using it?

Tired of doing the same things again and again in your controllers, like transforming a URL value in an object? Don't want to use ParamConverter Annotations?

This Resource Resolver is for you.

Installation

With composer :

If you are using symfony2 you can update your app/AppKernel.php file:

How to use it?

In a yaml routing file, it could look like this :

Every key under _resources will be return as a $key converted value in your request attributes.

However, you can use more concise ways to express your resources configuration :

Optional Resources

By default, the Rad Resource Resolver throws a Symfony\Component\HttpKernel\Exception\NotFoundHttpException if the resource was not found. You can override this behavior by adding the required option to false:

Available resource resolving arguments

How does it work?

A ResourcesListener listens to kernel.controller event and resolves automatically all resources in _resources. The component uses ParameterCaster objects to catch different argument types and Parser objects to resolve _resources locations syntax.

This means you can easily add your own ParameterCasters and Parsers to change the syntax used by the component.

To add your own ParameterCaster, just tag it with knp_rad_resource_resolver.parameter_caster. The tag to add a Parser is knp_rad_resource_resolver.parser.

Events

All events are listed here.

How can I hook resource resolution ?

There is two events :

- knp_rad_resource_resolver.before_resource_resolved:  dispatched before the resolution. You can set the resource before the resolution.
- knp_rad_resource_resolver.resource_resolved:         dispatched after the resolution.

How can I get all resolved resources ?

There is a service alias named knp_rad_resource_resolver.resource_container where you can get all resolved resources. You can also listen to the event knp_rad_resource_resolver.resource.added and be notified when a resource is added to the container.

License

This project is published under MIT License. Feel free to contribute.


All versions of rad-resource-resolver with dependencies

PHP Build Version
Package Version
Requires php Version ~7.0
symfony/config Version ~2.8 || ~3.0
symfony/dependency-injection Version ~2.8 || ~3.0
symfony/event-dispatcher Version ~2.8 || ~3.0
symfony/http-foundation Version ~2.8 || ~3.0
symfony/http-kernel Version ~2.8 || ~3.0
symfony/routing Version ~2.8 || ~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 knplabs/rad-resource-resolver contains the following files

Loading the files please wait ....