Zend framework2 +带参数的路由

I want to write custom routing in Zend framework2. I prepared following code:

'objects' => array(
            'type' => 'Literal',
            'options' => array(
                'route' => '/objects',
                'defaults' => array(
                    '__NAMESPACE__' => 'Application\Controller',
                    'controller' => 'Index',
                    'action' => 'decode',
                ),
            ),
            'may_terminate' => true,
            'child_routes' => array(
                'default' => array(
                    'type' => 'Segment',
                    'options' => array(
                        'route' => '/[:mask]',
                        'constraints' => array(
                            'mask' => '[a-zA-Z][a-zA-Z0-9_-.,]*',
                        ),
                        'defaults' => array(

                        ),
                    ),
                ),
            ),
        ),

I must routing adres like this:

http://restaurations.en/objects/cracow,0.html

http://restaurations.en/objects/cracow,swam,1.html

http:restaurations.en/objects/swam,3.html

The blod text I must get in my controller. Also, How should I prepre corect router?? How can I do it?

You should add the defaults as well something like this:

'objects' => array(
        'type' => 'Literal',
        'options' => array(
            'route' => '/objects',
            'defaults' => array(
                '__NAMESPACE__' => 'Application\Controller',
                'controller' => 'Index',
                'action' => 'decode',
            ),
        ),
        'may_terminate' => true,
        'child_routes' => array(
            'default' => array(
                'type' => 'Segment',
                'options' => array(
                    'route' => '/[:mask]',
                    'constraints' => array(
                        'mask' => '[a-zA-Z][a-zA-Z0-9_-.,]*',
                    ),
                    'defaults' => array(
                          '__NAMESPACE__' => 'Application\Controller',
                          'controller' => 'Index',
                          'action' => 'decode',
                    ),
                ),
            ),
        ),
    ),

Then on your controller to get the param you should do:

 $mask = $this->params()->fromRoute('mask');