TwistPHP Documentation

UserAgent

File path: dist/twist/Core/Models/UserAgent.model.php
Namespace: Twist\Core\Models
Extends:

Type: Model

UserAgent — Detection based on the User Agent string to work out the type of a device be it Desktop, Mac, Tablet or Mobile. OS and Browser details are also detected.

Example Usage

<?php
//Set the variables for the example
$strUserAgent null;

//Call the function detect with the example vars
\Twist\Core\Models\UserAgent::detect($strUserAgent);

Method List

Method Access Returns
loadDatastaticvoid
getstaticvoid
detectstaticvoid
getDeviceTypestaticvoid
getOSstaticvoid
getBrowserstaticvoid