/** * @return array[] An associative array mapping property IDs to info arrays. */ private function getPropertyInfo() { if ($this->dataType === '') { $propertyInfo = $this->propertyInfoStore->getAllPropertyInfo(); } else { $propertyInfo = $this->propertyInfoStore->getPropertyInfoForDataType($this->dataType); } // NOTE: $propertyInfo uses numerical property IDs as keys! ksort($propertyInfo); return $propertyInfo; }
/** * @see PropertyInfoStore::getAllPropertyInfo * * @return array[] */ public function getAllPropertyInfo() { if ($this->propertyInfo === null) { $this->propertyInfo = $this->cache->get($this->cacheKey); if (!is_array($this->propertyInfo)) { $this->propertyInfo = $this->store->getAllPropertyInfo(); $this->cache->set($this->cacheKey, $this->propertyInfo, $this->cacheDuration); wfDebugLog(__CLASS__, __FUNCTION__ . ': cached fresh property info table'); } else { wfDebugLog(__CLASS__, __FUNCTION__ . ': using cached property info table'); } } return $this->propertyInfo; }