CI_User_agent::_set_robot PHP Method

_set_robot() protected method

Set the Robot
protected _set_robot ( ) : boolean
return boolean
    protected function _set_robot()
    {
        if (is_array($this->robots) && count($this->robots) > 0) {
            foreach ($this->robots as $key => $val) {
                if (preg_match('|' . preg_quote($key) . '|i', $this->agent)) {
                    $this->is_robot = TRUE;
                    $this->robot = $val;
                    $this->_set_mobile();
                    return TRUE;
                }
            }
        }
        return FALSE;
    }