CI_User_agent::__construct PHP Метод

__construct() публичный Метод

Sets the User Agent and runs the compilation routine
public __construct ( ) : void
Результат void
    public function __construct()
    {
        if (isset($_SERVER['HTTP_USER_AGENT'])) {
            $this->agent = trim($_SERVER['HTTP_USER_AGENT']);
        }
        if ($this->agent !== NULL && $this->_load_agent_file()) {
            $this->_compile_data();
        }
        log_message('info', 'User Agent Class Initialized');
    }

Usage Example

Пример #1
0
 public function __construct()
 {
     parent::__construct();
     if ($this->agent !== NULL && $this->_load_agent_file()) {
         $this->_compile_data();
     }
     $this->_set_tablet();
 }
All Usage Examples Of CI_User_agent::__construct