本文整理汇总了PHP中TYPO3\Flow\Aop\JoinPointInterface::getMethodArguments方法的典型用法代码示例。如果您正苦于以下问题:PHP JoinPointInterface::getMethodArguments方法的具体用法?PHP JoinPointInterface::getMethodArguments怎么用?PHP JoinPointInterface::getMethodArguments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\Flow\Aop\JoinPointInterface
的用法示例。
在下文中一共展示了JoinPointInterface::getMethodArguments方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rewritePluginViewUris
/**
* @Flow\Around("method(TYPO3\Flow\Mvc\Routing\UriBuilder->uriFor())")
* @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint The current join point
* @return string The result of the target method if it has not been intercepted
*/
public function rewritePluginViewUris(JoinPointInterface $joinPoint)
{
/** @var \TYPO3\Flow\Mvc\ActionRequest $request */
$request = $joinPoint->getProxy()->getRequest();
$arguments = $joinPoint->getMethodArguments();
$currentNode = $request->getInternalArgument('__node');
if (!$request->getMainRequest()->hasArgument('node') || !$currentNode instanceof Node) {
return $joinPoint->getAdviceChain()->proceed($joinPoint);
}
$currentNode = $request->getInternalArgument('__node');
$controllerObjectName = $this->getControllerObjectName($request, $arguments);
$actionName = $arguments['actionName'] !== null ? $arguments['actionName'] : $request->getControllerActionName();
$targetNode = $this->pluginService->getPluginNodeByAction($currentNode, $controllerObjectName, $actionName);
// TODO override namespace
$q = new FlowQuery(array($targetNode));
$pageNode = $q->closest('[instanceof TYPO3.Neos:Document]')->get(0);
$result = $this->generateUriForNode($request, $joinPoint, $pageNode);
return $result;
}
示例2: removeObjectFromIndex
/**
* @Flow\AfterReturning("setting(Flowpack.ElasticSearch.realtimeIndexing.enabled) && within(TYPO3\Flow\Persistence\PersistenceManagerInterface) && method(public .+->(remove)())")
* @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint
* @return string
*/
public function removeObjectFromIndex(\TYPO3\Flow\Aop\JoinPointInterface $joinPoint)
{
$arguments = $joinPoint->getMethodArguments();
$object = reset($arguments);
$this->objectIndexer->removeObject($object);
}
示例3: forwardSignalToDispatcher
/**
* Passes the signal over to the Dispatcher
*
* @Flow\AfterReturning("methodAnnotatedWith(TYPO3\Flow\Annotations\Signal)")
* @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint The current join point
* @return void
*/
public function forwardSignalToDispatcher(\TYPO3\Flow\Aop\JoinPointInterface $joinPoint)
{
$signalName = lcfirst(str_replace('emit', '', $joinPoint->getMethodName()));
$this->dispatcher->dispatch($joinPoint->getClassName(), $signalName, $joinPoint->getMethodArguments());
}
示例4: generateValueHash
/**
* After returning advice, generates the value hash for the object
*
* @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint The current join point
* @return void
* @Flow\Before("classAnnotatedWith(TYPO3\Flow\Annotations\ValueObject) && method(.*->__construct()) && filter(TYPO3\Flow\Persistence\Doctrine\Mapping\Driver\FlowAnnotationDriver)")
*/
public function generateValueHash(JoinPointInterface $joinPoint)
{
$proxy = $joinPoint->getProxy();
$hashSource = get_class($proxy);
if (property_exists($proxy, 'Persistence_Object_Identifier')) {
$hashSource .= ObjectAccess::getProperty($proxy, 'Persistence_Object_Identifier', TRUE);
}
foreach ($joinPoint->getMethodArguments() as $argumentValue) {
if (is_array($argumentValue)) {
$hashSource .= $this->useIgBinary === TRUE ? igbinary_serialize($argumentValue) : serialize($argumentValue);
} elseif (!is_object($argumentValue)) {
$hashSource .= $argumentValue;
} elseif (property_exists($argumentValue, 'Persistence_Object_Identifier')) {
$hashSource .= ObjectAccess::getProperty($argumentValue, 'Persistence_Object_Identifier', TRUE);
} elseif ($argumentValue instanceof \DateTime) {
$hashSource .= $argumentValue->getTimestamp();
}
}
$proxy = $joinPoint->getProxy();
ObjectAccess::setProperty($proxy, 'Persistence_Object_Identifier', sha1($hashSource), TRUE);
}