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;
    }