本文整理汇总了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);
}
}
示例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);
}
示例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);
}
}
示例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));
}