Coder Social home page Coder Social logo

silex-router-provider's Introduction

Build Status Scrutinizer Code Quality Code Coverage

Symfony Router Service Provider for Silex 2.x / Pimple 3.x

ALPHA. First release in a few days.

Lets you to use the full Symfony Router class in your Silex/Pimple application.

Installation

Install the service provider using composer:

composer require skalpa/silex-router-provider

If you want to configure your routes using annotations, you'll also need the SensioFrameworkExtraBundle and a Doctrine annotations reader (see below):

composer require sensio/framework-extra-bundle

Registration

$app->register(new \Skalpa\Silex\Symfony\Routing\RouterServiceProvider(), [
    'router.resource' => '/path/to/routing.yml',
    'router.cache_dir' => '/path/to/cache',
]);

Configuration parameters

Parameter Type Description
router.debug bool Whether to enable the Router class debug mode
router.resource string|string[] Where to load the router configuration from
router.resource_type string Type of the resource (optional, needs to be set to annotation to import annotations from a PHP file)
router.cache_dir string Where the request matcher and URL generator should be dumped
router.file_locator.paths string[] List of folders passed to the file locator
router.options array Additional options passed to the Router
router.loaders string[] List of resource loaders that should be registered

Usage

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.