Returns a unique list of every rdf type configured in the table spec ['type'] restriction
@param string $storeName
@param string|null $pod
@return array
339079
public function getTypesInTableSpecifications($storeName, $pod = null)
    {
        return array_unique($this->getSpecificationTypes($this->getTableSpecifications($storeName), $pod));
    }
1114638
public static function init( $pod = null, $format = null ) {

		if ( null !== $pod || null !== $format ) {
			if ( ! isset( self::$instances[ $pod ] ) ) {
				// Cache API singleton per Pod
				self::$instances[ $pod ] = new PodsAPI( $pod, $format );
			}

			return self::$instances[ $pod ];
		} elseif ( ! is_object( self::$instance ) ) {
			self::$instance = new PodsAPI();
		}

		return self::$instance;
	}
832751
public function generateAndIndexSearchDocuments($resourceUri, $context, $podName, $specType = [])
    {
        $mongoCollection    = $this->config->getCollectionForCBD($this->storeName, $podName);

        $searchDocGenerator = $this->getSearchDocumentGenerator($mongoCollection, $context);
        $searchProvider = $this->getSearchProvider();

        //1. remove all search documents for this resource
        $searchProvider->deleteDocument($resourceUri, $context, $specType); // null means delete all documents for this resource

        //2. regenerate search documents for this resource
        $documentsToIndex   = [];
        // first work out what its type is
        $query = array("_id"=>array(
            'r'=>$this->labeller->uri_to_alias($resourceUri),
            'c'=>$this->getContextAlias($context)
        ));

        $resourceAndType = $mongoCollection->find(
            $query,
            [
                'projection' => ["_id" => 1, "rdf:type" => 1],
                'maxTimeMS' => $this->config->getMongoCursorTimeout()
            ]
        );
        foreach ($resourceAndType as $rt) {
            if (array_key_exists("rdf:type", $rt)) {
                $rdfTypes = [];

                if (array_key_exists('u', $rt["rdf:type"])) {
                    $rdfTypes[] = $rt["rdf:type"]['u'];
                } else {
                    // an array of types
                    foreach ($rt["rdf:type"] as $type) {
                        $rdfTypes[] = $type['u'];
                    }
                }

                $docs = $searchDocGenerator->generateSearchDocumentsBasedOnRdfTypes($rdfTypes, $resourceUri, $context);
                foreach ($docs as $d) {
                    $documentsToIndex[] = $d;
                }
            }
        }

        foreach ($documentsToIndex as $document) {
            if (!empty($document)) {
                $searchProvider->indexDocument($document);
            }
        }
    }
546668
public function getLangcodeFromStoreId($store_id) {
    $mapping = $this->getStoreLanguageMapping();
    $mapping = is_array($mapping) && !empty($mapping) ? array_flip(array_filter($mapping)) : NULL;

    if (empty($store_id)) {
      return array_shift($mapping);
    }

    return !empty($mapping[$store_id]) ? $mapping[$store_id] : NULL;
  }
310192
private function getBaseSelect($storeId, $type)
    {
        $connection = $this->getConnection();
        $select     = $connection->select();

        $select->from(['thesaurus' => $this->getMainTable()], [])
            ->join(
                ['terms' => $this->getTable(ThesaurusInterface::EXPANSION_TABLE_NAME)],
                'thesaurus.thesaurus_id = terms.thesaurus_id',
                []
            )
            ->join(
                ['store' => $this->getTable(ThesaurusInterface::STORE_TABLE_NAME)],
                'store.thesaurus_id = thesaurus.thesaurus_id',
                []
            )
            ->group(['thesaurus.thesaurus_id', 'terms.term_id'])
            ->where("thesaurus.type = ?", $type)
            ->where('thesaurus.is_active = 1')
            ->where('store.store_id IN (?)', [0, $storeId]);

        return $select;
    }
360842
public function getResourceTypes()
    {
        $types = [];
        foreach ($this as $entity) {
            $types[] = $entity->getType();
        }
        return array_unique($types);
    }
1306564
private function getPageFilter($filterName, $storeId = null)
    {
        $pageFilters = $this->getPageFilters($storeId);
        if ($pageFilters && @$pageFilters->$filterName) {
            return (array)$pageFilters->$filterName;
        }
        return [];
    }
1045564
protected function getTree($storeIds)
    {
        $filter = implode(',', $storeIds);
        if (isset($this->storeTrees[$filter])) {
            return $this->storeTrees[$filter];
        }

        $data = [];
        $stores = $this->storeManager->getStores(true);
        foreach ($stores as $store) {
            if (in_array($store->getId(), $storeIds)) {
                $data[$store->getId()] = $this->getStoreOptions($store);
            } elseif ($filter == 0) {
                $data[$store->getId()] = $this->getStoreOptions($store);
            }
        }

        $this->storeTrees[$filter] = $data;

        return $this->storeTrees[$filter];
    }
344187
def get_pod_for_build(self, build_id):
        
        pods = self.os.list_pods(label='openshift.io/build.name=%s' % build_id)
        serialized_response = pods.json()
        pod_list = [PodResponse(pod) for pod in serialized_response["items"]]
        if not pod_list:
            raise OsbsException("No pod for build")
        elif len(pod_list) != 1:
            raise OsbsException("Only one pod expected but %d returned",
                                len(pod_list))
        return pod_list[0]
1151558
public function getDefinedPredicatesInSpec($storename, $specId)
    {
        if(!isset($this->specPredicates[$storename]))
        {
            $this->specPredicates[$storename] = $this->getDefinedPredicatesInSpecs($storename);
        }
        if(isset($this->specPredicates[$storename][$specId]))
        {
            return $this->specPredicates[$storename][$specId];
        }
        return [];
    }
1092427
private function filterStore($storeId = null)
    {
        if ($storeId !== null) {
            if (!is_array($storeId)) {
                $storeId = explode(',', $storeId);
            }
            $this->subscriptionCollection->addFieldToFilter('store_id', ['in' => $storeId]);
        }

        return $this;
    }
10589
private function get_pod_info() {

		$pod_info = null;

		if ( pods_api()->pod_exists( $this->taxonomy ) ) {

			// Load the taxonomy Pod
			$params   = array(
				'name'       => $this->taxonomy,
				'table_info' => true,
			);
			$pod_info = pods_api()->load_pod( $params, false );
		}

		return $pod_info;

	}
500136
private function getSearchRequest($storeId, $sessionIds)
    {
        $queryFilters = ['session.uid' => $sessionIds];

        return $this->searchRequestBuilder->create($storeId, self::SEARCH_REQUEST_CONTAINER, 0, 0, null, [], [], $queryFilters);
    }
559727
public function getSynonyms($storeId)
    {
        $connection = $this->getConnection();
        $select     = $this->getBaseSelect($storeId, ThesaurusInterface::TYPE_SYNONYM);

        $select->columns(['terms' => new \Zend_Db_Expr('GROUP_CONCAT(terms.term)')]);

        return $connection->fetchCol($select);
    }
682781
public static function getGeoIPDatabaseTypeFromFilename($filename)
    {
        foreach (self::$dbNames as $key => $names) {
            foreach ($names as $name) {
                if ($name === $filename) {
                    return $key;
                }
            }
        }
        return false;
    }
231737
public function getTableSpecification($storeName, $tid)
    {
        if (isset($this->tableSpecs[$storeName]) && isset($this->tableSpecs[$storeName][$tid]))
        {
            return $this->tableSpecs[$storeName][$tid];
        }
        else
        {
            return null;
        }
    }
1146903
protected function getTripod($storeName, $podName, $opts = [])
    {
        $this->getTripodConfig();

        $opts = array_merge(
            $opts,
            [
                'stat' => $this->getStat(),
                'readPreference' => ReadPreference::RP_PRIMARY // important: make sure we always read from the primary
            ]
        );
        if ($this->tripod == null) {
            $this->tripod = new \Tripod\Mongo\Driver(
                $podName,
                $storeName,
                $opts
            );
        }
        return $this->tripod;
    }