/** * Get the name of the pool. * @return string */ public function getName() { $className = substr(get_class($this), strlen(CacheManager::getPoolNamespace())); $lower = strtolower(preg_replace('/(?<=\\w)(?=[A-Z])/', '_$1', $className)); $poolName = str_replace("\\", '.', $lower); return $poolName; }
public function translationOfPoolNamesToClassNamesData() { return array('simple' => array('basic', CacheManager::getPoolNamespace() . '\\Basic'), 'nested' => array('nested.pools', CacheManager::getPoolNamespace() . '\\Nested\\Pools'), 'sentence' => array('nested_pool.with_sentencecase.name', CacheManager::getPoolNamespace() . '\\NestedPool\\WithSentencecase\\Name')); }