public function robot($userAgent = null)
{
// Get bot rules
$rules = $this->mergeRules(static::$robots, array(static::$utilities['Bot']), array(static::$utilities['MobileBot']));
return $this->findDetectionRulesAgainstUA($rules, $userAgent);
}
public function getUA() { // Initialize UA $agent = new Agent(); $browser = $agent->browser(); // Assemble data $data = ['browser' => $browser, 'browser_version' => $agent->version($browser), 'languages' => array($agent->languages()), 'device' => $agent->device(), 'platform' => $agent->platform(), 'is_mobile' => $agent->isMobile(), 'is_tablet' => $agent->isTablet(), 'is_desktop' => $agent->isDesktop(), 'is_robot' => $agent->isRobot(), 'robot_name' => $agent->robot()]; return $data; }