SproutCMS

This is the code documentation for the SproutCMS project

class UserAgent

Implementation of parser for user-agents.json file

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2026-09-16
**/
class NewClassName extends UserAgent {
    
    public function getInfo () {
        // Method code goes here
    }
    
    public function getDeviceCategory () {
        // Method code goes here
    }
    
    public function getBodyClasses () {
        // Method code goes here
    }
    
    /**
    * Load the rules file
    **/
    public function __construct (string $filename) {
        // Method code goes here
    }
    
    /**
    * Return info about a given user-agent
    **/
    public function getAgentInfo ($ua) {
        // Method code goes here
    }
    
    /**
    * Internal recursive processing method
    **/
    private function process (string $ua, array $rules) {
        // Method code goes here
    }
    
    /**
    * Replace values in a way similar to preg_replace
    **/
    public function pregInject ($text, $matches) {
        // Method code goes here
    }
    
    public function init () {
        // Method code goes here
    }
    
}
?>