PHP code example of mvccore / ext-router-module-localization
1. Go to this page and download the library: Download mvccore/ext-router-module-localization library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mvccore / ext-router-module-localization example snippets
new \MvcCore\Ext\Routers\Modules\Route([
"pattern" => "//[<localization>.]example.com",
"module" => "main",
"constraints" => ["localization" => "-a-zA-Z"],
]);
$app = \MvcCore\Application::GetInstance();
$app->SetRouterClass('\MvcCore\Ext\Routers\ModuleLocalization');
...
// to get router instance for next configuration:
/** @var \MvcCore\Ext\Routers\ModuleLocalization $router */
$router = \MvcCore\Router::GetInstance();