/** * @see PropertyStatisticsStore::getUsageCounts * * @since 1.9 * * @param array $propertyIds * * @return array */ public function getUsageCounts(array $propertyIds) { if ($propertyIds === array()) { return array(); } $propertyStatistics = $this->dbConnection->select($this->dbConnection->tablename($this->table), array('usage_count', 'p_id'), array('p_id' => $propertyIds), __METHOD__); $usageCounts = array(); foreach ($propertyStatistics as $propertyStatistic) { assert(ctype_digit($propertyStatistic->p_id)); assert(ctype_digit($propertyStatistic->usage_count)); $usageCounts[(int) $propertyStatistic->p_id] = (int) $propertyStatistic->usage_count; } return $usageCounts; }