Returns the gamut of attribution metadata that can be associated with an
attachment

@param array $ids of attachments

@return array all attribution metadata
357642
public function getAttributionsMeta( $ids ) {
		$all_attributions = [];

		if ( $ids ) {
			foreach ( $ids as $id ) {
				$all_attributions[ $id ]['title'] = get_the_title( $id );
				$all_attributions[ $id ]['title_url'] = get_post_meta( $id, 'pb_media_attribution_title_url', true );
				$all_attributions[ $id ]['author'] = get_post_meta( $id, 'pb_media_attribution_author', true );
				$all_attributions[ $id ]['author_url'] = get_post_meta( $id, 'pb_media_attribution_author_url', true );
				$all_attributions[ $id ]['adapted'] = get_post_meta( $id, 'pb_media_attribution_adapted', true );
				$all_attributions[ $id ]['adapted_url'] = get_post_meta( $id, 'pb_media_attribution_adapted_url', true );
				$all_attributions[ $id ]['license'] = get_post_meta( $id, 'pb_media_attribution_license', true );
			}
		}

		return $all_attributions;
	}
652057
protected function _getMsgCids($mailbox, $ids)
    {
        $cid = $this->_getCid($mailbox);
        $out = array();

        foreach ($ids as $val) {
            $out[$val] = $cid . self::CID_SEPARATOR . $val;
        }

        return $out;
    }
1019423
public function findByIds(array $ids)
    {
        $args = [];
        $manager = $this->getManager();
        $args['body']['docs'] = [];
        $args['index'] = $manager->getIndexName();
        $args['type'] = $this->getType();

        foreach ($ids as $id) {
            $args['body']['docs'][] = [
                '_id' => $id
            ];
        }

        $mgetResponse = $manager->getClient()->mget($args);

        $return = [
            'hits' => [
                'hits' => [],
                'total' => 0,
            ]
        ];

        foreach ($mgetResponse['docs'] as $item) {
            if ($item['found']) {
                $return['hits']['hits'][] = $item;
            }
        }

        $return['hits']['total'] = count($return['hits']['hits']);

        return new DocumentIterator($return, $manager);
    }
571952
public function getFormJson(array $ids)
    {
        $values = [];
        foreach ($this->getValues($ids) as $id => $value) {
            $id = strtolower(preg_replace('/[A-Z]/', '-$0', strtr($id, ['.' => '-', '_' => '-'])));
            $values['js-' . $id] = $value;
        }

        return json_encode($values, JSON_UNESCAPED_UNICODE);
    }
525744
private function groupIdsByFile(array $ids) : array
    {
        $covered = [];

        foreach ($ids as $id) {
            $file = mb_substr($id, 0, (int) mb_strpos($id, '::'));

            if (!isset($covered[$file])) {
                $covered[$file] = [];
            }

            $covered[$file][] = mb_substr($id, mb_strpos($id, '::') + 2);
        }

        return $covered;
    }
82233
protected function doFetch(array $ids)
    {
        if ( ! $ids) {
            return [];
        }

        return $this->redis->hmget($this->namespace, $this->keys($ids));
    }
615469
public function getRelatedNodeIds($ids)
    {
        $cols = array(
                'story_object_id' ,
                'story_subject_id',
                'story_comment_id',
                'story_target_id' ,
                'parent_id',
                'owner_id',
        );

        foreach ($cols as $key => $value) {
            $cols[$key] = $value.' IN ('.implode(',', $ids).')';
        }

        $cols = implode(' OR ', $cols);

        //all the nodes ids that are somehow related to deleted nodes
        //possible objects (comments/stories/medium nodes)
        $nids = $this->getService('repos:base.node')
                    ->getQuery()
                    ->disableChain()
                    ->where($cols)->fetchValues('id');

        if (!empty($nids)) {
            $story_ids = $this->getService('repos:stories.story')->getQuery()->disableChain()->where(array('object.id' => $nids))->fetchValues('id');
            $nids = array_merge($nids, $story_ids);

            //if there are any medium nodes in the related nodes
            //check if they have any comments
            $comment_ids = $this->getService('repos:base.comment')->getQuery()->disableChain()->where(array('parent.id' => $nids))->fetchValues('id');
            $nids = array_merge($nids, $comment_ids);
        }

        return array_unique($nids);
    }
731228
public function id($ids){
        $ids = (array)$ids;
        if (count($ids) !== count($this->config['pkeys']))
            throw new Exception('Unmatched id count ' . count($ids)
                                . ':' . count($this->config['pkeys']));
        $pkeys = $this->config['pkeys'];
        foreach ($pkeys as $i => $pkey)
            $this->where->eq(array($this->voName . '.' . Util::toVoName($pkey) =>$ids[$i]));

        return $this;
    }
1239190
public function info($identities)
	{
		$ids   = [];
		$names = [];
		if (is_array($identities))
		{
			foreach ($identities as $identity)
			{
				if (gettype($identity) === 'integer')
				{
					// it's the id
					$ids[] = $identity;
				}
				else
				{
					// the summoner name
					$names[] = $identity;
				}
			}
		}
		else
		{
			if (gettype($identities) === 'integer')
			{
				// it's the id
				$ids[] = $identities;
			}
			else
			{
				// the summoner name
				$names[] = $identities;
			}
		}

		if (count($ids) > 0)
		{
			// it's the id
			$ids = $this->infoByIds($ids);
		}
		if (count($names) > 0)
		{
			// the summoner name
			$names = $this->infoByNames($names);
		}

		$summoners = $ids + $names;

		if (count($summoners) == 1)
		{
			return reset($summoners);
		}
		else
		{
			return $summoners;
		}

	}
1169443
public function idsToMongo(array $ids)
    {
        foreach ($ids as &$id) {
            $id = $this->idToMongo($id);
        }

        return $ids;
    }
903565
public function resourceLinkMeta(string $type, string $id): array
    {
        foreach ($this->resourceMap as $resourceLink) {
            if (isset($resourceLink["meta"]) && $resourceLink["type"] === $type && $resourceLink["id"] === $id) {
                return $resourceLink["meta"];
            }
        }

        return [];
    }
486367
public function getList($id = null)
    {
        if ($this->_mails) {
            if ($id != null && isset($this->_mails[$id])) {
                return [filesize($this->_path.'/'.$this->_mails[$id]['file_name'])];
            }

            $result = [];
            foreach ($this->_mails as $mail) {
                $result[] = filesize($this->_path.'/'.$mail['file_name']);
            }

            return $result;
        }

        return null;
    }
328204
public function getDocumentsFromDocumentPool(array $ids = null)
    {
        if (!$ids) {
            return $this->documentPool;
        }

        return array_intersect_key(
            $this->documentPool,
            array_flip(array_map('strval', $ids))
        );
    }
56157
protected function _metadatasFile($id)
    {
        $path = $this->_path($id);
        $fileName = $this->_idToFileName('internal-metadatas---' . $id);
        return $path . $fileName;
    }
507280
public function findByIds(array $ids)
    {
        $entities = [];

        for ($i = 0; $i < count($this->registries); $i++) {
            /** @var RegistryInterface $registry */
            $registry = $this->registries[ $i ];
            $found = $registry->findByKeys($ids);
            $entities = array_merge($entities, $found);

            $this->updateRegistries($found, $i - 1);

            if (count($entities) === count($ids)) {
                break;
            }
        }

        return $entities;
    }
411733
public function several(array $ids)
    {
        $results = [];

        foreach ($ids as $cacheId) {
            if ($this->cache->test($cacheId)) {
                $results[$cacheId] = $this->cache->load($cacheId);
            }

        }

        return $results;
    }
606065
public function getProductVariantsByIds($ids)
	{
		$this->ids($ids);
		$params = $this->getQueryParams();

		$uriAppend = 'detail/variants';
		$response = $this->handler->handle('GET', false, $uriAppend, $params);

		return $this->make($response);
	}