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


PHP ActionRequest::getInternalArgument方法代码示例

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


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

示例1: updateCredentials

 /**
  * Updates the authentication credentials, the authentication manager needs to authenticate this token.
  * This could be a username/password from a login controller.
  * This method is called while initializing the security context. By returning TRUE you
  * make sure that the authentication manager will (re-)authenticate the tokens with the current credentials.
  * Note: You should not persist the credentials!
  *
  * @param \TYPO3\Flow\Mvc\ActionRequest $actionRequest The current request instance
  *
  * @return bool TRUE if this token needs to be (re-)authenticated
  */
 public function updateCredentials(\TYPO3\Flow\Mvc\ActionRequest $actionRequest)
 {
     $httpRequest = $actionRequest->getHttpRequest();
     if ($httpRequest->getMethod() !== 'GET') {
         return;
     }
     if ($actionRequest->getInternalArgument('__casAuthenticationProviderName') === $this->authenticationProviderName) {
         $this->authenticationStatus = self::AUTHENTICATION_NEEDED;
     }
 }
开发者ID:rafaelka,项目名称:jasigphpcas,代码行数:21,代码来源:PhpCasToken.php

示例2: initializeCurrentPageFromRequest

 /**
  * @return void
  * @internal
  */
 protected function initializeCurrentPageFromRequest()
 {
     if (!$this->formState->isFormSubmitted()) {
         $this->currentPage = $this->formDefinition->getPageByIndex(0);
         return;
     }
     $this->lastDisplayedPage = $this->formDefinition->getPageByIndex($this->formState->getLastDisplayedPageIndex());
     // We know now that lastDisplayedPage is filled
     $currentPageIndex = (int) $this->request->getInternalArgument('__currentPage');
     if ($currentPageIndex > $this->lastDisplayedPage->getIndex() + 1) {
         // We only allow jumps to following pages
         $currentPageIndex = $this->lastDisplayedPage->getIndex() + 1;
     }
     // We now know that the user did not try to skip a page
     if ($currentPageIndex === count($this->formDefinition->getPages())) {
         // Last Page
         $this->currentPage = NULL;
     } else {
         $this->currentPage = $this->formDefinition->getPageByIndex($currentPageIndex);
     }
 }
开发者ID:sinso,项目名称:TYPO3.Flow,代码行数:25,代码来源:FormRuntime.php

示例3: updateCredentials

 /**
  * Updates the authentication credentials, the authentication manager needs to authenticate this token.
  * This could be a username/password from a login controller.
  * This method is called while initializing the security context. By returning TRUE you
  * make sure that the authentication manager will (re-)authenticate the tokens with the current credentials.
  * Note: You should not persist the credentials!
  *
  * @param ActionRequest $actionRequest The current request instance
  * @throws \InvalidArgumentException
  * @return boolean TRUE if this token needs to be (re-)authenticated
  */
 public function updateCredentials(ActionRequest $actionRequest)
 {
     if ($actionRequest->getHttpRequest()->getMethod() !== 'GET' || $actionRequest->getInternalArgument('__oauth2Provider') !== $this->authenticationProviderName) {
         return;
     }
     if (!$actionRequest->hasArgument('code')) {
         $this->setAuthenticationStatus(TokenInterface::WRONG_CREDENTIALS);
         $this->securityLogger->log('There was no argument `code` provided.', LOG_NOTICE);
         return;
     }
     $code = $actionRequest->getArgument('code');
     $redirectUri = $this->oauthUriBuilder->getRedirectionEndpointUri($this->authenticationProviderName);
     try {
         $this->credentials['accessToken'] = $this->tokenEndpoint->requestAuthorizationCodeGrantAccessToken($code, $redirectUri);
         $this->setAuthenticationStatus(TokenInterface::AUTHENTICATION_NEEDED);
     } catch (Exception $exception) {
         $this->setAuthenticationStatus(TokenInterface::WRONG_CREDENTIALS);
         $this->securityLogger->logException($exception);
         return;
     }
 }
开发者ID:avency,项目名称:Flowpack.OAuth2.Client,代码行数:32,代码来源:AbstractClientToken.php

示例4: initializePropertyMappingConfigurationFromRequest

 /**
  * Initialize the property mapping configuration in $controllerArguments if
  * the trusted properties are set inside the request.
  *
  * @param \TYPO3\Flow\Mvc\ActionRequest $request
  * @param \TYPO3\Flow\Mvc\Controller\Arguments $controllerArguments
  * @return void
  */
 public function initializePropertyMappingConfigurationFromRequest(\TYPO3\Flow\Mvc\ActionRequest $request, \TYPO3\Flow\Mvc\Controller\Arguments $controllerArguments)
 {
     $trustedPropertiesToken = $request->getInternalArgument('__trustedProperties');
     if (!is_string($trustedPropertiesToken)) {
         return;
     }
     $serializedTrustedProperties = $this->hashService->validateAndStripHmac($trustedPropertiesToken);
     $trustedProperties = unserialize($serializedTrustedProperties);
     foreach ($trustedProperties as $propertyName => $propertyConfiguration) {
         if (!$controllerArguments->hasArgument($propertyName)) {
             continue;
         }
         $propertyMappingConfiguration = $controllerArguments->getArgument($propertyName)->getPropertyMappingConfiguration();
         $this->modifyPropertyMappingConfiguration($propertyConfiguration, $propertyMappingConfiguration);
     }
 }
开发者ID:sokunthearith,项目名称:Intern-Project-Week-2,代码行数:24,代码来源:MvcPropertyMappingConfigurationService.php

示例5: internalArgumentsMayHaveObjectValues

 /**
  * @test
  */
 public function internalArgumentsMayHaveObjectValues()
 {
     $someObject = new \stdClass();
     $this->actionRequest->setArgument('__someInternalArgument', $someObject);
     $this->assertSame($someObject, $this->actionRequest->getInternalArgument('__someInternalArgument'));
 }
开发者ID:kszyma,项目名称:flow-development-collection,代码行数:9,代码来源:ActionRequestTest.php

示例6: internalArgumentsMayHaveObjectValues

 /**
  * @test
  */
 public function internalArgumentsMayHaveObjectValues()
 {
     $httpRequest = HttpRequest::create(new Uri('http://robertlemke.com/blog'));
     $someObject = new \stdClass();
     $actionRequest = new ActionRequest($httpRequest);
     $actionRequest->setArgument('__someInternalArgument', $someObject);
     $this->assertSame($someObject, $actionRequest->getInternalArgument('__someInternalArgument'));
 }
开发者ID:animaltool,项目名称:webinterface,代码行数:11,代码来源:ActionRequestTest.php


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