コード例 #1
0
ファイル: AbstractPool.php プロジェクト: elliotchance/hoard
 /**
  * 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;
 }
コード例 #2
0
 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'));
 }