/**
  * @return CacheProxyStrategy
  */
 protected function buildCacheStrategy()
 {
     $this->cache = new CacheSpy();
     $cacheStrategy = new CacheProxyStrategy();
     $cacheStrategy->setCache($this->cache);
     $this->proxyStrategyBagFactory->setCacheStrategy($cacheStrategy);
     $this->proxyStrategyRequestFactory->setCacheProxyStrategyRequestBuilder(new CacheProxyStrategyRequestBuilderImpl());
 }
示例#2
0
 /**
  * @return ProxyStrategyBagFactoryImpl
  */
 protected function buildProxyStrategyBagFactory()
 {
     $proxyStrategyBagFactory = new ProxyStrategyBagFactoryImpl();
     if (null !== $this->cache) {
         $proxyStrategyBagFactory->setCacheStrategy($this->buildCacheStrategy());
     }
     if (null !== $this->event) {
         $proxyStrategyBagFactory->setEventStrategy($this->buildEventStrategy());
     }
     if (null !== $this->logger) {
         $proxyStrategyBagFactory->setLogStrategy($this->buildLogStrategy());
     }
     if (null !== $this->security) {
         $proxyStrategyBagFactory->setSecurityStrategy($this->buildSecurityStrategy());
     }
     if (null !== $this->transaction) {
         $proxyStrategyBagFactory->setTransactionStrategy($this->buildTransactionStrategy());
     }
     return $proxyStrategyBagFactory;
 }