Coder Social home page Coder Social logo

useragent's Introduction

Useragent

Das AddOn hilft bei der Ermittlung des Endgerätes.

Neben der verkürzten Anwandung über die Useragent-Class, kann auch auf die mitgelieferten Vendor-Classes Mobile_detect und Browser.php direkt zurückgegriffen werden.

Anwendung über die Useragent-Class:

Prüfen ob das aktuelle Gerät ein Smartphone oder Tablet ist

if (useragent::isMobile()) {
//...
}

Prüfen ob das aktuelle Gerät ein Smartphone ist

if (useragent::isSmartphone()) {
//...
}

Prüfen ob das aktuelle Gerät ein Tablet ist

if (useragent::isTablet()) {
//...
}

Prüfen ob der aktuelle Browser Firefox ist

if (useragent::isBrowserFirefox()) {
//...
}

Prüfen ob der aktuelle Browser Opera ist

if (useragent::isBrowserOpera()) {
//...
}

Prüfen ob der aktuelle Browser Safari ist

if (useragent::isBrowserSafari()) {
//...
}

Prüfen ob der aktuelle Browser Chrome ist

if (useragent::isBrowserChrome()) {
//...
}

Prüfen ob der aktuelle Browser Internet Explorer ist

if (useragent::isBrowserInternetExplorer()) {
//...
}

Prüfen ob der aktuelle Browser Edge ist

if (useragent::isBrowserInternetEdge()) {
//...
}

useragent's People

Contributors

phoebusryan avatar schuer avatar sioweb avatar skerbis avatar ynamite avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

useragent's Issues

Fatal error: Class 'Mobile_Detect' not found

Hi,

bekomme einen Fatal Error:

"ErrorException" thrown in /Applications/MAMP/htdocs/abc/redaxo/src/addons/rex_useragent/lib/UserAgent.php on line 56
Fatal error: Class 'Mobile_Detect' not found

LG
Oliver

Init in boot.php und statische Methoden

du könntest den useragent in der boot.php initalizen und dann alles statisch ansprechbar machen. wäre schöner als in jedem modul ein init machen zu müssen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.