public function hasRequiredCapabilities() { if (empty($this->required_capabilities)) { return true; } if (self::$loaded_capabilities === null) { self::$loaded_capabilities = $this->device->getRootDevice()->getCapabilityNames(); } $missing_caps = array_diff($this->required_capabilities, self::$loaded_capabilities); return empty($missing_caps); }
protected function getControlValue($name) { // Check if loaded WURFL contains control caps if (!$this->device->getRootDevice()->isGroupDefined(self::WURFL_CONTROL_GROUP)) { return null; } $control_cap = self::PREFIX_CONTROL . $this->cleanCapabilityName($name); // Check if loaded WURFL contains the requested control cap if (!$this->device->getRootDevice()->isCapabilityDefined($control_cap)) { return null; } return $this->device->getCapability($control_cap); }