Download the PHP package rollerworks/route-autofill-bundle without Composer

On this page you can find all versions of the php package rollerworks/route-autofill-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 route-autofill-bundle

RollerworksRouteAutofillBundle

The RollerworksRouteAutofillBundle helps with generating routes that follow a shared prefix with parameters. All end-points at a deeper level always have the route-parameters of their prefix, and therefor can reuse these when generating a route that also has this same prefix.

For example: You are current at the following route /webhosting/{account}/ftp/users/ and want to generate a URL back to /webhosting/{account}/. Because the current page already has a value for {account}, we can easily reuse this.

Tip: This technique also works for host-requirements.

But there is more, this bundle also provides a RouteRedirectResponse to generate a redirect response for a route with ease.

What's this good for?

Their are times when you cannot provide the required route-parameters, or simply don't want to be bothered with these details.

The main purpose of this bundle is convenience, you can always solve these challenges differently but that also requires more work.

Requirements

You need at least PHP 7.1 and the Symfony FrameworkBundle.

Installation

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Basic usage

First of auto-filling the route parameters does not happen automatically, only when you use the AutoFilledUrlGenerator (compatible with the Symfony Routing system) auto-filling is provided.

$container->get(AutoFilledUrlGenerator::class);

Note: The RouteRedirectResponse already uses this route-generator.

Secondly, you need to set the autofill_variables option for your routes to enable the auto-filling of specific parameters.

Caution: This option must be set per route, provide either an array or a string with named separated by a , (account,id).

RouteRedirectResponse

The RouteRedirectResponse is provided to directly generate a redirect response for a route:

That's it.

Flash messages

Additionally you can add flash messages directly at the response.

When the arguments are empty (null) the message is past added to FlashBag as a string, otherwise it's an array like ['message' => 'message.id' => ['id' => 200]].

Translations and special formatting must still be done in the template. The withFlash() method can be called multiple times if needed.

License

All contents of this package are released under the MIT license.


All versions of route-autofill-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
symfony/framework-bundle Version ^4.4 || ^5.0
symfony/routing Version ^4.4 || ^5.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 rollerworks/route-autofill-bundle contains the following files

Loading the files please wait ....