Someone thinks this is good

No.  How this is considered good, I don’t know.  Who wrote the code isn’t important – this is the way the code is supposed to be written.  At least, this is the way it’s being demonstrated.  With a straight face.

I cannot fathom how anyone can honestly think this is good and want to encourage its use.

<?php
return array(
// lots of config stuff here

            /**
             * Routes
             */

            'ZendMvcRouterRouteStack' => array(
                'parameters' => array(
                    'routes' => array(
                        'zfcuser' => array(
                            'type' => 'Literal',
                            'priority' => 1000,
                            'options' => array(
                                'route' => '/user',
                                'defaults' => array(
                                    'controller' => 'zfcuser',
                                    'action'     => 'index',
                                ),
                            ),
                            'may_terminate' => true,
                            'child_routes' => array(
                                'login' => array(
                                    'type' => 'Literal',
                                    'options' => array(
                                        'route' => '/login',
                                        'defaults' => array(
                                            'controller' => 'zfcuser',
                                            'action'     => 'login',
                                        ),
                                    ),
                                ),

// more config stuff here
);

Author: Jason

Programmer

Leave a comment