2017 © Pedro Peláez
 

library tcc-skippable-segment

Skippable Route Config

image

tccltd/tcc-skippable-segment

Skippable Route Config

  • Friday, April 10, 2015
  • by shipleyr
  • Repository
  • 4 Watchers
  • 3 Stars
  • 2,844 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

TccSkippableSegment

This module is based on the work by: @towr (https://gist.github.com/towr/3320fb4ee13dfd079890)., (*1)

It allows you to specify segments of routes which can be skipped (E.g. [/:lang]/my-page/anotherpage - The lang part may be omitted)., (*2)

Usage

SkippableSegment route. Modified Segment route where you can skip optional segments., (*3)

'router' => [
    'routes' => [
        'home' => [
            'type' => 'SkippableSegment',
            'options' => [
                'route' => '[/:lang]',
                'constraints' => [
                    'lang' => '(?i:en|us)',
                ],
                'defaults' => [
                    'lang' => '',
                    'controller' => 'MyController',
                    'action' => 'index'
                ],
                'skippable' => [
                    'lang' => true,
                ],
            ],
            'may_terminate' => true,
            'child_routes' => [
                'my-page' => [
                    'type' => 'Segment',
                    ...
                    ...
                ],
            ],
        ],
    ],
);

The Versions

10/04 2015

dev-master

9999999-dev

Skippable Route Config

  Sources   Download

The Requires

 

10/04 2015

1.0.1

1.0.1.0

Skippable Route Config

  Sources   Download

The Requires

 

04/03 2015

1.0.0

1.0.0.0

Skippable Route Config

  Sources   Download

The Requires