private function _prepareMemcacheNamespaceCollection() { foreach ($this->configMemcacheNamespaces as $key => $configuration) { if ($this->namespaceCollection->has($key)) { throw MemcacheCollectionException::duplicateNamespace($key); } if (!$this->_hasConfiguration('pattern', $configuration)) { throw MemcacheCollectionException::missingRequiredNamespaceParameter($key, 'prefix'); } $namespace = new MemcacheNamespace(); $namespace->setName($key); $namespace->setPattern($configuration['pattern']); $namespace->setSeparator($this->_getConfiguration('separator', $configuration)); $variables = $this->_setupMemcacheKeyVariables($namespace->getPattern()); $namespace->setVariables($variables); $this->namespaceCollection->set($key, $namespace); } }