承接 mvccore/ext-router-module-media 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mvccore/ext-router-module-media

Composer 安装命令:

composer require mvccore/ext-router-module-media

包简介

MvcCore - Extension - Router - Modules With Media - extension to manage multiple websites in a single project and to manage website media versions (full/tablet/mobile) for different templates/CSS/JS files rendering, optionally contained in a domain or in URL address in the beginning.

README 文档

README

Latest Stable Version License PHP Version

MvcCore Router extension to manage multiple websites in single project and to manage website media versions (full/tablet/mobile for different templates/css/js files rendering, optionaly contained in URL address domain part or in URL address beinning), defined by domain routes, targeted by module property in URL completing.

This router is the way, how to route your requests in domain level with website media versions with params or variable sections, namespaces, default param values and more.

Outline

  1. Installation
  2. Features
  3. How It Works
  4. Usage

1. Installation

composer require mvccore/ext-router-module-media

go to top

2. Features

Extension has the same features as extensions bellow together:

Website media version could be contained in any module domain route as param named <media_version> match URL requests like this:

  • http://www.example.com/anything
  • http://mobile.example.com/anything
new \MvcCore\Ext\Routers\Modules\Route([
    "pattern"              => "//<media_version>.example.com",
    "module"               => "main",
    "constraints"          => ["media_version" => "www|mobile"],
]);

If there is not contained param <media_version> in matched module domain route pattern, website media version param has to be contained (or is automaticly inserted) in URL address beginning like this:

  • http://www.example.com/anything
  • http://www.example.com/mobile/anything How precisely is conained in URL address depends on advanced router configuration like allowed media version and more...

go to top

3. How It Works

Extension works in the same way as extensions bellow together:

Router is composed from traits in extensions named above.

go to top

4. Usage

Usage - Bootstrap Initialization

Add this to /App/Bootstrap.php or to very application beginning, before application routing or any other extension configuration using router for any purposes:

$app = \MvcCore\Application::GetInstance();
$app->SetRouterClass('\MvcCore\Ext\Routers\ModuleMedia');
...
// to get router instance for next configuration:
/** @var \MvcCore\Ext\Routers\ModuleMedia $router */
$router = \MvcCore\Router::GetInstance();

All other specific usage and advanced configuration is the same as extensions bellow together:

go to top

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2018-10-25