2017 © Pedro Peláez
 

library agent

Agent component provides a simple way to detect the kind of device that made the request.

image

flextype-components/agent

Agent component provides a simple way to detect the kind of device that made the request.

  • Thursday, April 12, 2018
  • by Awilum
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Agent Component

version MIT License, (*1)

Agent component provides a simple way to detect the kind of device that made the request., (*2)

Installation

composer require flextype-components/agent

Usage

use Flextype\Component\Agent\Agent;

Returns true if the user agent that made the request is identified as a mobile device., (*3)

if (Agent::isMobile()) {
    // Do something...
}  

Returns true if the user agent that made the request is identified as a robot/crawler., (*4)

if (Agent::isRobot()) {
    // Do something...
}  

Returns TRUE if the string you're looking for exists in the user agent string and FALSE if not., (*5)

if (Agent::is('iphone')) {
     // Do something...
}

if (Agent::is(array('iphone', 'ipod'))) {
    // Do something...
}

License

See LICENSE, (*6)

The Versions

12/04 2018

dev-master

9999999-dev https://github.com/flextype-components/agent

Agent component provides a simple way to detect the kind of device that made the request.

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

agent

12/04 2018

v1.1.1

1.1.1.0 https://github.com/flextype-components/agent

Agent component provides a simple way to detect the kind of device that made the request.

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

agent