WURFL/CapabilitiesHolder.php
public function getCapability($capabilityName)
    {
        if (isset($this->_device->capabilities[$capabilityName])) {
            return $this->_device->capabilities[$capabilityName];
        }
                
        $key = $this->_device->id . "_" . $capabilityName;
        $capabilityValue = $this->_cacheProvider->get($key);
        if (empty($capabilityValue)) {
            $capabilityValue = $this->_deviceRepository->getCapabilityForDevice($this->_device->fallBack, $capabilityName);
            // save it in cache
            $this->_cacheProvider->put($key, $capabilityValue);
        }

        // prevent useless gets when retrieving the same capability from this device again
        //$this->_device->capabilities[$capabilityName] = $capabilityValue;

        return $capabilityValue;
    }
public function getCapability($capabilityName)
    {
        if (isset($this->_device->capabilities[$capabilityName])) {
            return $this->_device->capabilities[$capabilityName];
        }
                
        $key = $this->_device->id . "_" . $capabilityName;
        $capabilityValue = $this->_cacheProvider->get($key);
        if (empty($capabilityValue)) {
            $capabilityValue = $this->_deviceRepository->getCapabilityForDevice($this->_device->fallBack, $capabilityName);
            // save it in cache
            $this->_cacheProvider->put($key, $capabilityValue);
        }

        // prevent useless gets when retrieving the same capability from this device again
        //$this->_device->capabilities[$capabilityName] = $capabilityValue;

        return $capabilityValue;
    }
public function getCapability ( $ capabilityName ) { if ( isset ( $ this -> _device -> capabilities [ $ capabilityName ] ) ) { return $ this -> _device -> capabilities [ $ capabilityName ] ; } $ key = $ this -> _device -> id . "_" . $ capabilityName ; $ capabilityValue = $ this -> _cacheProvider -> get ( $ key ) ; if ( empty ( $ capabilityValue ) ) { $ capabilityValue = $ this -> _deviceRepository -> getCapabilityForDevice ( $ this -> _device -> fallBack , $ capabilityName ) ; // save it in cache $ this -> _cacheProvider -> put ( $ key , $ capabilityValue ) ; } // prevent useless gets when retrieving the same capability from this device again //$this->_device->capabilities[$capabilityName] = $capabilityValue; return $ capabilityValue ; }
Returns the value of a given capability name

@param string $capabilityName
@return string Capability value
@throws WURFLException if the value of the $capability name is illegal
Returns the value of a given capability name