当前位置: 首页>>代码示例>>PHP>>正文


PHP JoinPointInterface::getResult方法代码示例

本文整理汇总了PHP中TYPO3\Flow\Aop\JoinPointInterface::getResult方法的典型用法代码示例。如果您正苦于以下问题:PHP JoinPointInterface::getResult方法的具体用法?PHP JoinPointInterface::getResult怎么用?PHP JoinPointInterface::getResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\Flow\Aop\JoinPointInterface的用法示例。


在下文中一共展示了JoinPointInterface::getResult方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: logFinishServiceCall

 /**
  * Logs calls
  *
  * @Flow\After("method(PerfectIn\Api\Webservice\WebserviceCall->invoke())")
  * @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint The current joinpoint
  */
 public function logFinishServiceCall(\TYPO3\Flow\Aop\JoinPointInterface $joinPoint)
 {
     $callIdentifier = $joinPoint->getProxy()->getClass() . '::' . $joinPoint->getProxy()->getMethod();
     if ($joinPoint->hasException()) {
         $this->logger->log($this->logIdentifier . ' - error - ' . $joinPoint->getException()->getMessage() . '(' . $joinPoint->getException()->getCode() . ')', LOG_ERR);
     } else {
         $this->logger->log($this->logIdentifier . ' - response - ' . $this->getLogMessageForVariable($joinPoint->getResult()), LOG_INFO);
     }
 }
开发者ID:benovie,项目名称:PerfectIn.Api,代码行数:15,代码来源:LoggingAspect.php

示例2: logPrivilegeAccessDecisions

 /**
  * Logs calls and result of isPrivilegeTargetGranted()
  *
  * @Flow\After("method(TYPO3\Flow\Security\Authorization\PrivilegeManager->isPrivilegeTargetGranted())")
  * @param JoinPointInterface $joinPoint
  * @return void
  */
 public function logPrivilegeAccessDecisions(JoinPointInterface $joinPoint)
 {
     $decision = $joinPoint->getResult() === true ? 'GRANTED' : 'DENIED';
     $message = sprintf('Decided "%s" on privilege "%s".', $decision, $joinPoint->getMethodArgument('privilegeTargetIdentifier'));
     $this->securityLogger->log($message, \LOG_INFO);
 }
开发者ID:kszyma,项目名称:flow-development-collection,代码行数:13,代码来源:LoggingAspect.php

示例3: logCollectGarbage

 /**
  * Logs calls of collectGarbage()
  *
  * @Flow\AfterReturning("within(TYPO3\Flow\Session\SessionInterface) && method(.*->collectGarbage())")
  * @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint The current joinpoint
  * @return void
  */
 public function logCollectGarbage(\TYPO3\Flow\Aop\JoinPointInterface $joinPoint)
 {
     $sessionRemovalCount = $joinPoint->getResult();
     if ($sessionRemovalCount > 0) {
         $this->systemLogger->log(sprintf('%s: Triggered garbage collection and removed %s expired sessions.', $this->getClassName($joinPoint), $sessionRemovalCount), LOG_INFO);
     } elseif ($sessionRemovalCount === 0) {
         $this->systemLogger->log(sprintf('%s: Triggered garbage collection but no sessions needed to be removed.', $this->getClassName($joinPoint)), LOG_INFO);
     } elseif ($sessionRemovalCount === false) {
         $this->systemLogger->log(sprintf('%s: Ommitting garbage collection because another process is already running. Consider lowering the GC propability if these messages appear a lot.', $this->getClassName($joinPoint)), LOG_WARNING);
     }
 }
开发者ID:kszyma,项目名称:flow-development-collection,代码行数:18,代码来源:LoggingAspect.php

示例4: collectRoleVotes

 /**
  *
  * @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint
  * @Flow\After("method(TYPO3\Flow\Security\Policy\PolicyService->getPrivilegesForJoinPoint(*))")
  * @return void
  */
 public function collectRoleVotes(\TYPO3\Flow\Aop\JoinPointInterface $joinPoint)
 {
     $role = $joinPoint->getMethodArgument('role');
     $privileges = $joinPoint->getResult();
     \Debug\Toolbar\Service\DataStorage::add('Security:RoleVotes', array('role' => $role, 'privileges' => $privileges));
 }
开发者ID:radmiraal,项目名称:Debug.Toolbar,代码行数:12,代码来源:DataCollectors.php


注:本文中的TYPO3\Flow\Aop\JoinPointInterface::getResult方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。