示例#1
0
 /**
  * {@inheritDoc}
  */
 public function extract(HandlerInterface $handler)
 {
     $cacheKey = $this->generateCacheKey($handler);
     $handlerDoc = $this->cache->get($cacheKey);
     if (!$handlerDoc) {
         $handlerDoc = $this->delegate->extract($handler);
         $this->cache->set($cacheKey, $handlerDoc);
     }
     return $handlerDoc;
 }
示例#2
0
 /**
  * {@inheritDoc}
  */
 public function generate(HandlerInterface $handler, $outputFormat)
 {
     $documentation = $this->extractor->extract($handler);
     return $this->formatterRegistry->render($documentation, $outputFormat);
 }