How to organize a large number of Routes in Zend Framework 2

We have a lot of routes for our application. We are using child_routes to try to keep them organized, but the config files still get very long and difficult to read through.

Does anyone know of a better way to organize the routes?

We're using Zend Studio, does anyone know of tools in it that can help?

Answers


TL\DR: not using ZF2

Well, that's config files and the current routing and there's nothing really to change that. When it comes to ZF3 however, the routing config should go down a little. This becomes even more true when you'll be using the short array syntax [].

You can take a loot at the draft of the ZF3 Router here (remember, this can still change!)

Using indexed parameters for routes, we'll be able to keep the config to a minimum of what we need. And considering you'll be using php 5.5 it can be simplified even further using UserController::class instead of Application\Controller\UserController


Need Your Help

Image projection in Matlab with Hough transform

matlab hough-transform

I am using Matlab to input a 4x4 grid of coloured squares, and output a list of colours. My program works fine for squares, but I am having trouble adapting it to rotated images:

How will I use a selected value to display a dynamic content?

javascript php jquery html mysql

This has been consuming a lot of my time. Please help me. :(