Download the PHP package elvandar/ec-bundle without Composer
On this page you can find all versions of the php package elvandar/ec-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elvandar/ec-bundle
More information about elvandar/ec-bundle
Files in elvandar/ec-bundle
Package ec-bundle
Short Description A simple bundle to make communication with external websites easier
License MIT
Homepage https://github.com/Elvandarysalys/EcBundle
Informations about the package ec-bundle
EcBundle
Small Bundle to help use externals urls inside a symfony project.
The goal is to help the communication by centralizing all the routes inside a single configuration fila and providing methods to use thems.
Installation
Open a command console, enter your project directory and execute:
Hom to use the bundle
Inside , you can configure your sites and routes:
The file is organised betwin . Each represents a grouping of urls under the list.
Configuration example
Use the service
You can now use the service to retrieve :
or redirect to the desired route :
Bboth the and methods follow the same parameters rules:
1 - First parameter
The first parameter is the name of your route.
For example inside the example configuration, the name for http://second-site/blog
is blog
.
This parameter is required.
2 - Second parameter
The second parameter is the name of the site. It is not required but will be needed if multiple roads have the same name.
For example, the second parameter is not needed for the blog
route but will be needed for the home
or the contact
routes.