/**
  * @param \TYPO3\Flow\Aop\JoinPoint $joinPoint
  * @Flow\Around("method(TYPO3\Flow\Mvc\Routing\RouterCachingService->buildRouteCacheIdentifier())")
  * @return string
  */
 public function buildRouteCacheIdentifierWithAcceptHeader(\TYPO3\Flow\Aop\JoinPoint $joinPoint)
 {
     /** @var \TYPO3\Flow\Http\Request $httpRequest */
     $httpRequest = $joinPoint->getMethodArgument('httpRequest');
     $mediaTypes = $httpRequest->getAcceptedMediaTypes();
     if (FALSE !== ($wildcard = array_search('*/*', $mediaTypes))) {
         $mediaTypes[$wildcard] = $this->defaultMediaType;
         $mediaTypes = array_unique($mediaTypes);
     }
     $commonTypes = array_intersect($this->allowedMediaTypes, $mediaTypes);
     return md5(sprintf('%s_%s_%s_%s', $httpRequest->getUri()->getHost(), $httpRequest->getRelativePath(), $httpRequest->getMethod(), implode('_', $commonTypes)));
 }
 /**
  * @Flow\AfterThrowing("within(TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper) && method(.*->render())")
  * @param \TYPO3\Flow\Aop\JoinPoint $joinPoint
  */
 public function catchException(\TYPO3\Flow\Aop\JoinPoint $joinPoint)
 {
     $exception = $joinPoint->getException();
     $this->errorHandler->handleException($exception);
 }
Esempio n. 3
0
 /**
  * @Flow\AfterThrowing("Ttree\Scheduler\Aspect\LoggingAspect->allTasks")
  * @param JoinPoint $jointPoint
  * @throws \Exception
  */
 public function logTaskException(JoinPoint $jointPoint)
 {
     /** @var Task $task */
     $exception = $jointPoint->getException();
     $this->systemLogger->logException($exception, array('task' => $jointPoint->getClassName()));
 }