示例#1
0
 public function getPoolProvider(PoolInterface $pool)
 {
     $currentContext = $this->fetchProviderKey();
     if ($pool->hasContext($currentContext->getId())) {
         $providerName = $pool->getProviderNameByContext($currentContext->getId());
         return $pool->getProvider($providerName);
     }
     return null;
 }
示例#2
0
 public function getPoolProvider(PoolInterface $pool)
 {
     $currentContext = $this->fetchProviderKey();
     #fix for non-standard context ID.
     $contextKey = $this->getSlugify()->slugify($currentContext->getId(), '_');
     if ($pool->hasContext($contextKey)) {
         $providerName = $pool->getProviderNameByContext($contextKey);
         return $pool->getProvider($providerName);
     }
     return;
 }