Download the PHP package mvccore/ext-router-media without Composer

On this page you can find all versions of the php package mvccore/ext-router-media. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ext-router-media

MvcCore - Extension - Router - Media

Latest Stable Version License PHP Version

MvcCore Router extension to manage your website media version in URL to have media flag in the request, controller and view to render different templates, CSS and js files for mobiles, tablets or desktops.

Outline

  1. Installation
  2. Features
    2.1. Features - Routing
    2.2. Features - Url Generating
  3. How It Works
    3.1. How It Works - Routing
    3.2. How It Works - Url Completing
  4. Usage
    4.1. Usage - Bootstrap Initialization
    4.2. Usage - Media Url Prefixes And Allowed Media Versions
  5. Advanced Configuration
    5.1. Advanced Configuration - Session Expiration
    5.2. Advanced Configuration - Strict Session Mode
    5.3. Advanced Configuration - Routing GET Requests Only

1. Installation

go to top

2. Features

2.1. Features - Routing

go to top

2.2. Features - Url Generating

go to top

3. How It Works

3.1. How It Works - Routing

go to top

3.2. How It Works - Url Completing

go to top

4. Usage

4.1. 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:

go to top

4.2. Usage - Media Url Prefixes And Allowed Media Versions

There are configured three media site versions with URL address prefixes by default:

To allow only selected media site versions and to configure url prefixes, you can use:

go to top

5. Advanced Configuration

5.1. Advanced Configuration - Session Expiration

There is possible to change session expiration about detected media site version value to not recognize media site version every request where is no prefix in URL, because to process all regular expressions in \Mobile_Detect library could take some time. By default there is 1 hour. You can change it by:

go to top

5.2. Advanced Configuration - Strict Session Mode

In session strict mode, there is not possible to change media site version only by requesting different media site version prefix in URL. Strict session mode is router mode when media site version is managed by session value from the first request recognition. All requests to different media site version than the version in session are automatically redirected to media site version stored in the session.

Normally, there is possible to get different media site version only by requesting different media site version URL prefix. For example - to get a different version from full version, for example, to get mobile version, it's only necessary to request application with configured mobile prefix in URL like this: /mobile/any/application/request/path.

In session strict mode, there is possible to change media site version only by special $_GET parameter in your media version navigation. For example - to get a different version from full version, for example, mobile version, you need to add into query string parameters like this: /any/application/request/path?switch_media_version=mobile Then, there is changed media site version stored in the session and the user is redirected to the mobile application version with mobile URL prefixes everywhere.

To have this session strict mode, you only need to configure router by:

go to top

5.3. Advanced Configuration - Routing GET Requests Only

The router manages media site version only for GET requests. It means redirections to the proper version in session strict mode or to redirect in the first request to recognized media site version. POST requests and other request methods to manage for media site version doesn't make sense. For those requests, you have still media site version record in session and you can use it any time. But to process all request methods, you can configure the router to do so like this:

go to top


All versions of ext-router-media with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
mvccore/mvccore Version ^5.2
mvccore/ext-router-extended Version ^5.2
mobiledetect/mobiledetectlib Version ^2.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mvccore/ext-router-media contains the following files

Loading the files please wait ....