CI_User_agent::_load_agent_file PHP Method

_load_agent_file() protected method

Compile the User Agent Data
protected _load_agent_file ( ) : boolean
return boolean
    protected function _load_agent_file()
    {
        if ($found = file_exists(APPPATH . 'config/user_agents.php')) {
            include APPPATH . 'config/user_agents.php';
        }
        if (file_exists(APPPATH . 'config/' . ENVIRONMENT . '/user_agents.php')) {
            include APPPATH . 'config/' . ENVIRONMENT . '/user_agents.php';
            $found = TRUE;
        }
        if ($found !== TRUE) {
            return FALSE;
        }
        $return = FALSE;
        if (isset($platforms)) {
            $this->platforms = $platforms;
            unset($platforms);
            $return = TRUE;
        }
        if (isset($browsers)) {
            $this->browsers = $browsers;
            unset($browsers);
            $return = TRUE;
        }
        if (isset($mobiles)) {
            $this->mobiles = $mobiles;
            unset($mobiles);
            $return = TRUE;
        }
        if (isset($robots)) {
            $this->robots = $robots;
            unset($robots);
            $return = TRUE;
        }
        return $return;
    }