コード例 #1
0
 /**
  * @return \OpenClassrooms\ServiceProxy\ServiceProxyCacheInterface|\OpenClassrooms\ServiceProxy\ServiceProxyInterface
  */
 public function create($class, $tagParameters)
 {
     $builder = $this->serviceProxyBuilder->create($class);
     if (null !== ($cache = $this->buildCache($tagParameters))) {
         $builder->withCache($cache);
     }
     return $builder->build();
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     $this->serviceProxyBuilder = $this->getServiceProxyBuilder(self::$cacheDir);
     $this->cacheProviderDecorator = new CacheProviderDecoratorMock();
     $this->proxy = $this->serviceProxyBuilder->create(new CacheAnnotationClass())->withCache($this->cacheProviderDecorator)->build();
 }