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


PHP JoinPointInterface::getMethodArguments方法代码示例

本文整理汇总了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;
 }
开发者ID:testbird,项目名称:neos-development-collection,代码行数:24,代码来源:PluginUriAspect.php

示例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);
 }
开发者ID:robertlemke,项目名称:Flowpack.ElasticSearch,代码行数:11,代码来源:IndexerAspect.php

示例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());
 }
开发者ID:nlx-sascha,项目名称:flow-development-collection,代码行数:12,代码来源:SignalAspect.php

示例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);
 }
开发者ID:sokunthearith,项目名称:Intern-Project-Week-2,代码行数:28,代码来源:PersistenceMagicAspect.php


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