Download the PHP package vxm/yii2-mobile-first without Composer

On this page you can find all versions of the php package vxm/yii2-mobile-first. 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 yii2-mobile-first

Yii2 Mobile First

Latest Stable Version Total Downloads Build Status Code Coverage Scrutinizer Code Quality Yii2

About it

An extension provide an easy way to implementing mobile-first principle base on Mobile Detect wrapper for Yii2 application.

Requirements

Installation

Require Yii2 Mobile First using Composer:

Usage

This extension give you two features:

Adaptive Filter

To use this filter you just add it to an application config file:

If user go to your site with url: yoursite.com/product?sort=price and you want to keep /product?sort=price url path when redirect user to mobile site: m.yoursite.com/product?sort=price you just config:

View Render Behavior

It is a way to replace a set of views with another by user device without the need of touching the original view rendering code. You can use it to systematically change the look and feel of an application depend on user device. For example, when call $this->render('about') in SiteController, you will be rendering the view file @app/views/site/about.php, if user use mobile device, the view file @app/views/site/mobile/about.php will be rendered, instead.

To use it, you need to attach it to the view application component in configure file:

The dirMap property governs how view files should be replaced by user device. It takes an array of key-value pairs, where the keys are the device types and the values are the corresponding view sub-directory. The replacement is based on user device: if user device match with any key in the dirMap array, a view path will be added with the corresponding sub-directory value. Using the above configuration example, when user using mobile device because it match the key mobile, a view path will be added mobile look like @app/views/site/mobile/about.php. Of course you can change the value or add more cases:

The above configuration if user using mobile or tablet device, the view path will be added mobile-tablet.


All versions of yii2-mobile-first with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
yiisoft/yii2 Version ~2.0.13
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 vxm/yii2-mobile-first contains the following files

Loading the files please wait ....