Returns an array of stores that would meet the requirements for every definition.

These stores would be 100% suitable to map as defaults for cache modes.

@return array[] An array of stores, keys are the store names.
489834
public static function get_stores_suitable_for_mode_default() {
        $factory = cache_factory::instance();
        $config = $factory->create_config_instance();
        $requirements = 0;
        foreach ($config->get_definitions() as $definition) {
            $definition = cache_definition::load($definition['component'].'/'.$definition['area'], $definition);
            $requirements = $requirements | $definition->get_requirements_bin();
        }
        $stores = array();
        foreach ($config->get_all_stores() as $name => $store) {
            if (!empty($store['features']) && ($store['features'] & $requirements)) {
                $stores[$name] = $store;
            }
        }
        return $stores;
    }
69328
public static function get_definition_summaries() {
        $factory = cache_factory::instance();
        $config = $factory->create_config_instance();
        $storenames = array();
        foreach ($config->get_all_stores() as $key => $store) {
            if (!empty($store['default'])) {
                $storenames[$key] = new lang_string('store_'.$key, 'cache');
            } else {
                $storenames[$store['name']] = $store['name'];
            }
        }
        /* @var cache_definition[] $definitions */
        $definitions = array();
        foreach ($config->get_definitions() as $key => $definition) {
            $definitions[$key] = cache_definition::load($definition['component'].'/'.$definition['area'], $definition);
        }
        foreach ($definitions as $id => $definition) {
            $mappings = array();
            foreach (cache_helper::get_stores_suitable_for_definition($definition) as $store) {
                $mappings[] = $storenames[$store->my_name()];
            }
            $return[$id] = array(
                'id' => $id,
                'name' => $definition->get_name(),
                'mode' => $definition->get_mode(),
                'component' => $definition->get_component(),
                'area' => $definition->get_area(),
                'mappings' => $mappings,
                'canuselocalstore' => $definition->can_use_localstore(),
                'sharingoptions' => self::get_definition_sharing_options($definition->get_sharing_options(), false),
                'selectedsharingoption' => self::get_definition_sharing_options($definition->get_selected_sharing_option(), true),
                'userinputsharingkey' => $definition->get_user_input_sharing_key()
            );
        }
        return $return;
    }
135431
public function getAll()
    {
        $this->initializeOnDemand();
        $result = array();

        foreach ($this->cache as $key => $options) {
            $result[$key] = $options[ConstProviderInterface::CACHE_PARAM_VALUE];
        }

        return $result;
    }
1090662
public static function getCacheStorageMethods()
    {
        $activeMethods = array();
        foreach (self::$storageMethods as $storageMethod) {
            $cacheStorageClass = 'PHPExcel_CachedObjectStorage_' . $storageMethod;
            if (call_user_func(array($cacheStorageClass, 'cacheMethodIsAvailable'))) {
                $activeMethods[] = $storageMethod;
            }
        }
        return $activeMethods;
    }
392551
public function toOptionArray()
    {
        return [
            [
                'value' => \Dotdigitalgroup\Email\Model\Sync\Catalog\CatalogSyncFactory::SYNC_CATALOG_DEFAULT_LEVEL,
                'label' => 'Default Level',
            ],
            [
                'value' => \Dotdigitalgroup\Email\Model\Sync\Catalog\CatalogSyncFactory::SYNC_CATALOG_STORE_LEVEL,
                'label' => 'Store Level',
            ],
        ];
    }
296717
public static function getStores()
	{
		// Instantiate variables
		$stores = [];

		// Get a list of types, only including php files
		$types = glob(__DIR__ . DIRECTORY_SEPARATOR . 'Storage' . DIRECTORY_SEPARATOR . '*.php');

		// Loop through the types and find the ones that are available
		foreach ($types as $type)
		{
			// Get just the file name
			$type = basename($type);

			// Derive the class name from the type
			$class = __NAMESPACE__ . '\\Storage\\' . str_ireplace('.php', '', ucfirst(trim($type)));

			// If the class doesn't exist...these are not the droids you're looking for...
			if (!class_exists($class))
			{
				continue;
			}

			// Our class exists, so now we just need to know if it passes it's test method
			if (call_user_func_array(array($class, 'isAvailable'), array()))
			{
				// Connector names should not have file extensions
				$stores[] = str_ireplace('.php', '', $type);
			}
		}

		$stores = array_map('strtolower', $stores);

		return $stores;
	}
334885
public function get_stores($mode, $requirements = 0) {
        $stores = array();
        foreach ($this->configstores as $name => $store) {
            // If the mode is supported and all of the requirements are provided features.
            if (($store['modes'] & $mode) && ($store['features'] & $requirements) === $requirements) {
                $stores[$name] = $store;
            }
        }
        return $stores;
    }
382584
public static function get_default_mode_stores() {
        global $OUTPUT;
        $instance = cache_config::instance();
        $adequatestores = cache_helper::get_stores_suitable_for_mode_default();
        $icon = new pix_icon('i/warning', new lang_string('inadequatestoreformapping', 'cache'));
        $storenames = array();
        foreach ($instance->get_all_stores() as $key => $store) {
            if (!empty($store['default'])) {
                $storenames[$key] = new lang_string('store_'.$key, 'cache');
            }
        }
        $modemappings = array(
            cache_store::MODE_APPLICATION => array(),
            cache_store::MODE_SESSION => array(),
            cache_store::MODE_REQUEST => array(),
        );
        foreach ($instance->get_mode_mappings() as $mapping) {
            $mode = $mapping['mode'];
            if (!array_key_exists($mode, $modemappings)) {
                debugging('Unknown mode in cache store mode mappings', DEBUG_DEVELOPER);
                continue;
            }
            if (array_key_exists($mapping['store'], $storenames)) {
                $modemappings[$mode][$mapping['store']] = $storenames[$mapping['store']];
            } else {
                $modemappings[$mode][$mapping['store']] = $mapping['store'];
            }
            if (!array_key_exists($mapping['store'], $adequatestores)) {
                $modemappings[$mode][$mapping['store']] = $modemappings[$mode][$mapping['store']].' '.$OUTPUT->render($icon);
            }
        }
        return $modemappings;
    }
10951
public function getQueueConfigurationScopes()
    {
        // cache of seen, unique AMQP configurations
        $configurations = array();
        // list of stores to produce unique AMQP configuration
        $uniqueStores = array();
        foreach (Mage::app()->getStores(true) as $store) {
            $amqpConfig = $this->getStoreLevelAmqpConfigurations($store);
            if (!in_array($amqpConfig, $configurations, true)) {
                $configurations[] = $amqpConfig;
                $uniqueStores[] = $store;
            }
        }
        return $uniqueStores;
    }
384825
def stores
      return self._stores if not self._stores.empty?
      response = api_get("Stores.egg")
      stores = JSON.parse(response.body)
      stores.each do |store|
        self._stores <<  Newegg::Store.new(store['Title'], store['StoreDepa'], store['StoreID'], store['ShowSeeAllDeals'])
      end
      self._stores
    end
787029
public function storageNames()
    {
        $names = [];

        foreach ($this->storages as $name=>$storage) {
            $names[$name] = true;
        }

        foreach ($this->bindings as $name=>$binding) {
            $names[$name] = true;
        }

        return new StringList(array_keys($names));
    }
1017850
public function getDefinitionHypercubes()
	{
		if ( $this->hypercubesCache !== null ) return $this->hypercubesCache;

		$hypercubes = array();

		foreach ( $this->getDefinitionRoleRefs() as $roleRefsKey => $role )
		{
			$hypercubes += $this->getDefinitionRoleHypercubes( $roleRefsKey );
		}

		$this->hypercubesCache = $hypercubes;
		return $hypercubes;
	}
1117945
public function keys()
    {
        $keys = [];

        $storages = $this->preloadAllStorages();

        foreach ($storages as $url=>$storage) {

            $prefix = $this->keyPrefix($url);

            $keys[$prefix] = true;

            foreach ($storage->keys() as $key) {
                $keys["$prefix.$key"] = true;
            }
        }

        return new StringList(array_keys($keys));
    }
630162
public static function getStores()
	{
		// Get a list of types, only including php files
		$glob = glob(__DIR__ . DIRECTORY_SEPARATOR . 'Storage' . DIRECTORY_SEPARATOR . '*.php');

		$names = array();

		if ($glob === false)
		{
			return $names;
		}

		// Loop through the types and find the ones that are available
		foreach ($glob as $handler)
		{
			// Get just the file name
			$name = basename($handler);

			// Derive the class name from the type
			$class = __NAMESPACE__ . '\\Storage\\' . str_ireplace('.php', '', ucfirst(trim($name)));

			// If the class doesn't exist, these are not the droids you're looking for...
			if (!class_exists($class))
			{
				continue;
			}

			// Our class exists, so now we just need to know if it passes it's test method
			if (call_user_func_array(array($class, 'isAvailable'), array()))
			{
				$names[] = str_ireplace('.php', '', $name);
			}
		}

		$names = array_map('strtolower', $names);

		return $names;
	}
1369134
public static function getMappings()
    {
        $basePath = self::getBasePath();

        return array(
            realpath($basePath.'Address/Resources/config/doctrine/model') => 'LMammino\EFoundation\Address\Model',
            realpath($basePath.'Attribute/Resources/config/doctrine/model') =>
                'LMammino\EFoundation\Attribute\Model',
            realpath($basePath.'Cart/Resources/config/doctrine/model') => 'LMammino\EFoundation\Cart\Model',
            realpath($basePath.'Order/Resources/config/doctrine/model') => 'LMammino\EFoundation\Order\Model',
            realpath($basePath.'Price/Resources/config/doctrine/model') => 'LMammino\EFoundation\Price\Model',
            realpath($basePath.'Product/Resources/config/doctrine/model') => 'LMammino\EFoundation\Product\Model',
            realpath($basePath.'Variation/Resources/config/doctrine/model') =>
                'LMammino\EFoundation\Variation\Model',
        );
    }
648236
private function cachedAllPerStore() {
		if (!isset($this->{__METHOD__})) {
			$this->{__METHOD__} = array_merge($this->cachedI(), $this->cachedObjectsI());
		}
		return $this->{__METHOD__};
	}
1038307
private function loadStores()
    {
        $itemIds = array_keys($this->_items);

        if (count($itemIds)) {
            $connection = $this->getConnection();
            $select = $connection->select()
                ->from(['thesaurus_entity_store' => $this->getTable(ThesaurusInterface::STORE_TABLE_NAME)])
                ->where('thesaurus_entity_store.' . ThesaurusInterface::THESAURUS_ID . ' IN (?)', $itemIds);

            $result = $connection->fetchPairs($select);

            if ($result) {
                foreach ($this as $item) {
                    $entityId = $item->getData(ThesaurusInterface::THESAURUS_ID);
                    if (!isset($result[$entityId])) {
                        continue;
                    }
                    $storeId = $result[$item->getData(ThesaurusInterface::THESAURUS_ID)];
                    $storeCode = $this->storeManager->getStore($storeId)->getCode();

                    if ($result[$entityId] == 0) {
                        $stores = $this->storeManager->getStores(false, true);
                        $storeId = current($stores)->getId();
                        $storeCode = key($stores);
                    }

                    $item->setData('_first_store_id', $storeId);
                    $item->setData('store_code', $storeCode);
                    $item->setData('store_id', [$result[$entityId]]);
                }
            }
        }
    }