Load data about slots from "slots" table.
Array of the matches ids used as filter

@param array $matchesIds
@return array
507475
private function _loadSlotsInfo(array $matchesIds)
    {
        $db = Db::obtain();
        $slots_query = 'SELECT * FROM ' . Db::realTablename('slots') . ' WHERE match_id IN (' . implode(
            ',',
            $matchesIds
        ) . ')';
        return $db->fetchArrayPDO($slots_query, array());
    }
992819
public static function findByIds($ids, $throwException = true)
    {
        $ids = array_unique($ids);
        $ids = array_map('intval', $ids);
        $ids2find = array_diff($ids, array_keys(static::$identityMap));
        if (count($ids2find) > 0) {
            Property::find()->where(['in', 'id', $ids2find])->all();
        }

        return array_reduce(
            $ids,
            function ($carry, $id) use ($throwException) {
                if (isset(static::$identityMap[$id])) {
                    $carry[$id] = static::$identityMap[$id];
                } elseif ($throwException) {
                    throw new \RuntimeException("Property $id not found");
                }
                return $carry;
            },
            []
        );
    }
386246
private function _filter(array $matches)
    {
        $filters = explode('|', $matches[0]);
        $var = $filters[0];
        unset($filters[0]);
        foreach ($filters as $filter) {
            $params = explode(':', $filter);
            $filterName = $params[0];
            unset($params[0]);
            $array = 'array(';
            foreach ($params as $param) {
                $array .= $param . ',';
            }
            $array = trim($array, ',') . ')';
            $var = 'getFilter(\'' . $filterName . '\')->setOptions(' . $array . ')->filter(' . $var . ')';
        }
        return $var;
    }
75547
public function setIds(array $ids)
    {
        $actualIds = [];

        foreach ($ids as $id) {
            $this->assertValidId($id);
            $actualIds[] = $id;
        }

        $this->clearCachedValueIf($this->ids != $actualIds);
        $this->ids = $actualIds;
    }
841468
public function findByIds($ids)
    {
        if (!is_array($ids)) {
            $ids = explode(',', $ids);
        }

        return $this->createQueryBuilder('ml')
            ->andWhere('ml.id IN (:ids)')
            ->setParameter('ids', $ids)
            ->getQuery()
            ->getResult();
    }
790626
protected function get_slots_by_slotid($slots) {
        if (!$slots) {
            return array();
        }
        $newslots = array();
        foreach ($slots as $slot) {
            $newslots[$slot->id] = $slot;
        }
        return $newslots;
    }
139831
public function block($ids): array
    {
        $ids = $this->mergeBlcokedAt((array) $ids);

        return $this->blockingUsers()->syncWithoutDetaching($ids);
    }
339670
public function several(array $ids)
    {
        $result = [];
        foreach ($ids as $id) {
            if ($this->has($id)) {
                $result[$id] = $this->get($id);
            }
        }
        return $result;

    }
1271254
public function runePages($identities)
	{
		$ids = $this->extractIds($identities);
		$ids = implode(',', $ids);

		$array     = $this->request('summoner/'.$ids.'/runes');
		$summoners = [];
		foreach ($array as $summonerId => $data)
		{
			$runePages = [];
			foreach ($data['pages'] as $info)
			{
				if ( ! isset($info['slots']))
				{
					// no runes in this page
					$info['slots'] = [];
				}

				$slots = $info['slots'];
				unset($info['slots']);

				$runePage = $this->attachStaticDataToDto(new RunePage($info));

				// set runes
				$runes = [];
				foreach ($slots as $slot)
				{
					$id         = $slot['runeSlotId'];
					$rune       = $this->attachStaticDataToDto(new Rune($slot));
					$runes[$id] = $rune;
				}
				$runePage->runes = $runes;
				$runePages[]     = $runePage;
			}
			$summoners[$summonerId] = $runePages;
		}

		$this->attachResponses($identities, $summoners, 'runePages');

		if (is_array($identities))
		{
			return $summoners;
		}
		else
		{
			return reset($summoners);
		}
	}
580456
public function filter($ids = array())
    {
        $data = $this->get();
        $data = array_intersect($data, $ids);

        $this->meta          = array();
        $this->meta['count'] = count($data);
        $this->raw_data      = implode(self::SEPARATOR_ELEMENT, $data);
    }
904280
public function loadSheets(string $mappingId): array
    {
        $mappingArray = $this->getMapping();
        // The URL is the only required mapping parameter
        if (isset($mappingArray[$mappingId]['url'])) {
            $mapping = &$mappingArray[$mappingId];
            $spreadsheetId = $this->getSpreadsheetId($mapping['url']);

            $service = new \Google_Service_Sheets($this->getClient());
            /** @var \Google_Service_Sheets_Spreadsheet $spreadsheet */
            $spreadsheet = $service->spreadsheets->get($spreadsheetId);

            // First thing we do is figuring out what sheets are there in the requested document
            $sheets = [];
            foreach ($spreadsheet->getSheets() as $s) {
                /** @var \Google_Service_Sheets_SheetProperties $sp */
                $sp = &$s['properties'];

                // Skip all sheets with trailing underscore
                if (preg_match('~_$~', $sp->getTitle())) {
                    continue;
                }

                $sheets[preg_replace("~'~", '', $sp->getTitle())] = [
                    'title' => $sp->getTitle(),
                    // TODO we could decide batchGet basedon the size of the batch. Do we care?
//                    'columnCount' => $sp->getGridProperties()->getColumnCount(),
//                    'rowCount' => $sp->getGridProperties()->getRowCount(),
                    'values' => [],
                ];

                unset($s);
            }

            // Second step is to figure out what's the requested range. Did we want to skip some rows?
            // TODO: Each sheet might need different setting for this - yes? no?
            $startingRow = isset($mapping['startingFromRow']) ? (int) $mapping['startingFromRow'] : 1;
            $range = 'A'.$startingRow.':ZZ'; // A1:ZZ means the whole sheet

            // If we've got more than one sheet and batchGet is not blocked, let's download everything in one request
            if (count($sheets) > 1 && isset($mapping['batchGet']) && $mapping['batchGet']) {
                /** @var \Google_Service_Sheets_BatchGetValuesResponse $batchResult */
                $batchResult = $service->spreadsheets_values->batchGet(
                    $spreadsheetId,
                    ['ranges' => array_map(function ($sheet) use ($range) { return $sheet['title'].'!'.$range; }, array_values($sheets))]
                );

                /** @var \Google_Service_Sheets_ValueRange $valueRange */
                foreach ($batchResult->getValueRanges() as $valueRange) {
                    preg_match('~^(.*)![A-Z0-9]+:[A-Z0-9]+$~', $valueRange->getRange(), $matches);

                    if (!empty($matches) && isset($matches[1])) {
                        $sheetName = preg_replace("~'~", '', $matches[1]);

                        if (isset($sheets[$sheetName])) {
                            $sheets[$sheetName]['values'] = $valueRange->getValues();
                        } else {
                            throw new \Exception(sprintf('GSuite returned a sheet with name %s, which wasn\'t found in our sheet table. Please remove any special characters from the sheet name.', $valueRange->getRange()));
                        }
                    }
                    unset($valueRange, $matches);
                }
            } else {
                foreach ($sheets as $sheetName => &$sheetProperties) {
                    /** @var \Google_Service_Sheets_ValueRange $valueRange */
                    $valueRange = $service->spreadsheets_values->get($spreadsheetId, $sheetName.'!'.$range);
                    $sheetProperties['values'] = $valueRange->getValues();
                    unset($valueRange);
                }
            }

            return [$spreadsheet->getProperties()->getTitle(), $sheets];
        } else {
            throw new InvalidConfigurationException(sprintf('Mapping %s doesn\'t exist or has no URL configured.', $mappingId));
        }
    }
617680
protected function getIdsFromHashes(array $hashes)
    {
        $ids = [];

        foreach ($hashes as $hash) {
            $split = explode('.', $hash);
            $ids[] = $split[1];
        }

        return $ids;
    }
707897
protected function _loadFromDb($sOXID)
    {
        $sSelect = $this->buildSelectString(["`{$this->getViewName()}`.`oxid`" => $sOXID]);
        $aData = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC)->getRow($sSelect);

        return $aData;
    }
294844
public function get_slot_tags_for_slot_id($slotid) {
        if (!$this->hasloadedtags) {
            // Lazy load the tags just in case they are never required.
            $this->populate_slot_tags();
            $this->hasloadedtags = true;
        }

        return isset($this->slottags[$slotid]) ? $this->slottags[$slotid] : [];
    }
192783
public function findByIds(array $ids): array
    {
        $spec = $this->createSpecification()->where(['id' => $ids]);

        return $this->findAll($spec);
    }
815753
public function findActionsForIds(array $ids)
    {
        if (empty($ids)) {
            return array();
        }

        $datas = $this->client->hmget($this->getActionKey(), $ids);

        return array_values(
            array_map(
                function ($v) {
                    return unserialize($v);
                },
                $datas
            )
        );
    }
720496
public function load($id, array $parameters = [], array $headers = [])
    {
        return $this->loadCollection($parameters, $headers)->filterId($id);
    }