New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFR] Add event router:beforeMount a group. #13158

Closed
oscarmolinadev opened this Issue Nov 12, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@oscarmolinadev

oscarmolinadev commented Nov 12, 2017

I would like to have an event before mount a group of routes for manipulate the group. I'm developing a very big app with a lot of modules and each one have a group of routes, so in my case I want set a hostname by config, eg:

// config
<?php
$hosts = [
  'webModule' => 'example.com'
  'appModule' => 'test.com'
]

// groups
<?php

use Phalcon\Mvc\Router\Group 

$groupWeb = new Group();
$groupWeb->setHostName('#webModule#');
...

$groupApp = new Group();
$groupApp->setHostName('#appModule#');
...

With an event router:beforeMount I can replace the hostname, add one by default for each group, etc.. a lot of posibilites not only for edit the hostname.

Thanks, oscarmolinadev

@Arrim Arrim referenced this issue Nov 23, 2017

Merged

[NFR] Add event router:beforeMount a group #13180

2 of 3 tasks complete

@sergeyklay sergeyklay added this to the 3.3.x milestone Nov 23, 2017

@sergeyklay

This comment has been minimized.

Show comment
Hide comment
@sergeyklay

sergeyklay Nov 23, 2017

Member

Implemented in the 3.3.x branch

Member

sergeyklay commented Nov 23, 2017

Implemented in the 3.3.x branch

@sergeyklay sergeyklay closed this Nov 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment