Returns capabilities and their values for the current device

@return array Device capabilities array

@see \Wurfl\Device\ModelDeviceInterface::getCapabilities()
324392
public function getAllCapabilities()
    {
        $capabilities = array();
        foreach (array_reverse($this->modelDevices) as $modelDevice) {
            /* @var Device\ModelDeviceInterface $modelDevice */
            $capabilities = array_merge($capabilities, $modelDevice->getCapabilities());
        }

        $capabilities = array_diff_key($capabilities, array_flip(VirtualCapabilityProvider::getControlCapabilities()));

        return $capabilities;
    }
450415
@Nullable
    public Capabilities getCapabilities() {
        MutableCapabilities capabilities = (MutableCapabilities) super.getCapabilities();
        if (capabilities != null) {
            capabilities.setCapability(PLATFORM_NAME, IOS_PLATFORM);
        }
        return capabilities;
    }
869804
public function getStatusAllowableValues()
    {
        return [
            self::STATUS_ACTIVE,
            self::STATUS_PAUSED,
            self::STATUS_READY,
            self::STATUS_DELIVERED,
            self::STATUS_CANCELLED,
            self::STATUS_REVERTED,
        ];
    }
577225
public function getDesiredCapabilities()
	{
		$capabilities = parent::getDesiredCapabilities();

		if ( !isset($capabilities['platform']) ) {
			$capabilities['platform'] = 'Windows 7';
		}

		if ( !isset($capabilities['version']) ) {
			$capabilities['version'] = '';
		}

		return $capabilities;
	}
451649
def to_capabilities(self):
        """"""
        caps = self._caps

        opts = self._options.copy()
        if len(self._arguments) > 0:
            opts[self.SWITCHES] = ' '.join(self._arguments)

        if len(self._additional) > 0:
            opts.update(self._additional)

        if len(opts) > 0:
            caps[Options.KEY] = opts
        return caps
963628
public function getAllCapabilitiesForDevice($deviceID)
    {
        $devices      = array_reverse($this->getDeviceHierarchy($deviceID));
        $capabilities = array();

        foreach ($devices as $device) {
            /** @var $device \Wurfl\Device\ModelDeviceInterface */
            if (is_array($device->capabilities)) {
                $capabilities = array_merge($capabilities, $device->capabilities);
            }
        }
        $capabilities = array_diff_key($capabilities, array_flip(VirtualCapabilityProvider::getControlCapabilities()));

        return $capabilities;
    }
1000446
private function getParentModules(): array
    {
        if (! isset($this->capabilities['action'][Utils::getTypeParent()])) {
            return [];
        }

        $result = [];
        foreach ($this->capabilities['action'][Utils::getTypeParent()] as $capability) {
            if (in_array($capability->getName(), $this->capabilities['user'])) {
                $result = $capability->getParentModules();
            }
        }

        return $result;
    }
328552
public function getStatusInfo()
    {
        $int = $this->variant->statusInfo();

        $possible = [
            1 => 'Other',
            2 => 'Unknown',
            3 => 'Enabled',
            4 => 'Disabled',
            5 => 'Not Applicable',
        ];

        return $this->getFromPossibleValues($int, $possible);
    }
451993
public static function getRequiredCapabilities()
    {
        $caps = array();
        
        foreach (self::$virtual_capabilities as $cap_name => $vc_name) {
            if (strpos($vc_name, '.') !== false) {
                // Group of capabilities
                list($group, $property) = explode('.', $vc_name);
                $class = "WURFL_VirtualCapability_{$group}Group";
            } else {
                // Individual capability
                $class = "WURFL_VirtualCapability_$vc_name";
            }
            
            $model = new $class();
            $caps = array_unique(array_merge($caps, $model->getRequiredCapabilities()));
            unset($model);
        }
        
        return $caps;
    }
693846
protected static function getDevicesFromStorage()
    {
        try {
            $file = (static::$deviceFile !== null) ? static::$deviceFile : WS::config()->get('device_storage');
            $content = @file_get_contents($file);
            if (!empty($content)) {
                $devices = json_decode($content, true);
                if(isset($devices['device'])){
                    return $devices['device'];
                }

                return $devices;
            } else {
                return null;
            }
        } catch (\Exception $e) {
            return null;
        }
    }
297094
final public function get($capability = null) {

        if ( is_null($capability) ) return $this->rpc_capabilities;

        else if ( array_key_exists($capability, $this->rpc_capabilities) ) return $this->rpc_capabilities[$capability];

        else return null;

    }
1130458
public function getEnabledExtensions()
    {
        $returnValue = array();

        $enabled = $this->getExtensionById('generis')->getConfig(self::EXTENSIONS_CONFIG_KEY);
        foreach ($this->getInstalledExtensions() as $ext) {
            if (isset($enabled[$ext->getId()]) && $enabled[$ext->getId()]['enabled']) {
                $returnValue[$ext->getId()] = $ext;
            }
        }
    
        return (array) $returnValue;
    }
655836
public function getAvailableDrivers()
    {
        $this->method = 'getAvailableDrivers';
        $this->sendRequest();
        $this->method = null;

        return $this->availableDrivers ? $this->availableDrivers : array();
    }
191084
public function toArray()
    {
        return [
            'userAgent'          => $this->userAgent,
            'browser'            => $this->browser,
            'version'            => $this->version,
            'majorVersion'       => $this->majorVersion,
            'minorVersion'       => $this->minorVersion,
            'browserWithVersion' => $this->browserWithVersion,
            'publisher'          => $this->publisher,
            'platform'           => $this->platform,
            'device'             => $this->device,
            'devicePointer'      => $this->devicePointer,
            'isMobile'           => $this->isMobile,
            'isTablet'           => $this->isTablet(),
            'isCrawler'          => $this->isCrawler,
        ];
    }
45968
def capabilities(self):
		

		caps = []
		for cap in DeviceCapability:
			if self._libinput.libinput_device_has_capability(self._handle, cap):
				caps.append(cap)
		return tuple(caps)
898946
def _get_capabilities(self):
        
        conn = self._get_connection()
        capabilities = []
        for c in conn.server_capabilities:
            capabilities.append(c)
        LOG.debug("Server capabilities: %s", capabilities)
        return capabilities
1189598
public function getFunctions()
    {
        $functions = array(
            new \Twig_SimpleFunction('get_available_devices', array($this, 'getAvailableDevices')),
            new \Twig_SimpleFunction('is_mobile', array($this, 'isMobile')),
            new \Twig_SimpleFunction('is_tablet', array($this, 'isTablet'))
        );

        foreach ($this->getAvailableDevices() as $device => $fixedName) {
            $methodName = 'is'.$device;
            $twigFunctionName = 'is_'.$fixedName;
            $functions[] = new \Twig_SimpleFunction($twigFunctionName, array($this, $methodName));
        }

        return $functions;
    }