raindrop/mobiledetect-bundle

Symfony Raindrop Mobile Detect Bundle

dev-master 2013-10-30 10:41 UTC

This package is not auto-updated.

Last update: 2024-09-14 13:59:03 UTC


README

Build Status

此扩展包增加了检测移动设备的支持。它使用了轻量级的PHP类 Mobile_Detect

安装:

首先将依赖项添加到您的composer.json文件中

"require": {
    ...
    "raindrop/mobiledetect-bundle": "dev-master"
},

然后使用以下命令安装扩展包

php composer.phar update

在您的应用内核中启用扩展包

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Raindrop\MobileDetectBundle\RaindropMobileDetectBundle(),
    );
}

现在扩展包已被启用。