PHPackages                             mxc-commons/mxc-routes - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. mxc-commons/mxc-routes

ActiveLibrary[Framework](/categories/framework)

mxc-commons/mxc-routes
======================

Zend Framework 2 Module that provides a new route to generate child route structures automatically according to a template configuration you provide.

028[1 issues](https://github.com/mxc-commons/MxcRoutes/issues)PHP

Since Jun 14Pushed 9y ago1 watchersCompare

[ Source](https://github.com/mxc-commons/MxcRoutes)[ Packagist](https://packagist.org/packages/mxc-commons/mxc-routes)[ RSS](/packages/mxc-commons-mxc-routes/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

MxcRoutes
=========

[](#mxcroutes)

Version 1.0.1 created by Frank Hein and the mxc-commons team.

MxcRoutes is part of the maxence Open Source Initiative by [maxence business consulting gmbh, Germany](http://www.maxence.de).

Introduction
------------

[](#introduction)

Tired of writing down the same routing configuration for your standard controller classes again and again? Then MxcRoutes may be something you have been waiting for.

MxcRoutes provides an additional route type which generates the child route structure automatically according to template you provide once.

Multiple child route models are supported and get selected through the route definition.

Requirements
------------

[](#requirements)

- [Zend Framework 2](https://github.com/zendframework/zf2) (latest master)

Features / Goals
----------------

[](#features--goals)

Main design goal of MxcRoutes is to encapsulate the controller child route definition via template defintions. So module programmers can setup the complete child route scheme for a controller be defining a single route.

**1. Provide the capability to configure a controller routing models with a single route definition**

**2. Allow to select among several child route models by name**

Set `'child_route_model' => 'myChildRouteModelName'` in the `defaults` section of the MxcRoute.

**3. Allow to extend child route models by inheritence**

Set `'extends' => 'myParentChildRouteName'` within the child route model definition.

Installation
------------

[](#installation)

### Main Setup

[](#main-setup)

#### By cloning project

[](#by-cloning-project)

1. Clone this project into your `./vendor/` directory.

#### With composer

[](#with-composer)

1. Add this project in your composer.json:

    ```
    "require": {
        "mxc-commons/mxc-routes": "dev-master"
    }
    ```
2. Now tell composer to download MxcRoutes by running the command:

    ```
    $ php composer.phar update
    ```

#### Post installation

[](#post-installation)

1. Enabling it in your `application.config.php`file.

    ```
