2017 © Pedro PelĂĄez
 

library routing-service-provider

Import your routes from YAML, PHP files or Directory.

image

sergiors/routing-service-provider

Import your routes from YAML, PHP files or Directory.

  • Wednesday, May 31, 2017
  • by sergiors
  • Repository
  • 2 Watchers
  • 4 Stars
  • 42,336 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

Routing Service Provider

Build Status, (*1)

Import your routes from yaml, php files or directory., (*2)

Install

composer require sergiors/routing-service-provider "dev-master"

How to user

Your yaml file, (*3)

index_controller:
    prefix: /
    defaults: {_controller: 'Acme\Acme\Controller\IndexController::indexAction'}

In your php file, (*4)

use Sergiors\Silex\RoutingServiceProvider;

$app->register(new RoutingServiceProvider(), [
    'routing.resource' => __DIR__.'/routing.yml'
]);

Remeber, you need install symfony/yaml to use YAML., (*5)

To use %root_dir% in your yaml files, you need to install symfony/dependency-injection and set $app['routing.replacements'] = ['root_dir' => ''], (*6)

License

MIT, (*7)

The Versions