Horde_ActiveSync_Device::_getClientType PHP Method

_getClientType() protected method

Attempt to determine the *client* application as opposed to the device, which may or may not be the client.
protected _getClientType ( ) : string
return string The client name.
    protected function _getClientType()
    {
        // Differentiate between the deviceType and the client app.
        if (!empty($this->properties[self::OS]) && stripos($this->properties[self::OS], 'Android') !== false || Horde_String::lower($this->deviceType) == self::TYPE_ANDROID) {
            // We can detect native Android, TouchDown, and Nine.
            // Moxier does not distinguish itself, so we can't sniff it.
            if (strpos($this->userAgent, 'TouchDown') !== false) {
                return self::TYPE_TOUCHDOWN;
            } else {
                if ($this->_isNine()) {
                    return self::TYPE_NINE;
                } else {
                    if (stripos($this->userAgent, 'Android') !== false) {
                        return $this->deviceType;
                    } else {
                        return self::TYPE_ANDROID;
                    }
                }
            }
        } else {
            return $this->deviceType;
        }
    }