getClassName() public method

Returns the class name of the target class this join point refers to
public getClassName ( ) : string
return string The class name
 /**
  * Returns a string message, giving insights what happened during privilege evaluation.
  *
  * @param string $privilegeReasonMessage
  * @return string
  */
 protected function renderDecisionReasonMessage($privilegeReasonMessage)
 {
     if (count($this->securityContext->getRoles()) === 0) {
         $rolesMessage = 'No authenticated roles';
     } else {
         $rolesMessage = 'Authenticated roles: ' . implode(', ', array_keys($this->securityContext->getRoles()));
     }
     return sprintf('Access denied for method' . chr(10) . 'Method: %s::%s()' . chr(10) . chr(10) . '%s' . chr(10) . chr(10) . '%s', $this->joinPoint->getClassName(), $this->joinPoint->getMethodName(), $privilegeReasonMessage, $rolesMessage);
 }
 /**
  * Invokes a given join point
  *
  * @param \Neos\Flow\Aop\JoinPointInterface $joinPoint
  * @return mixed
  */
 public function Flow_Aop_Proxy_invokeJoinPoint(\Neos\Flow\Aop\JoinPointInterface $joinPoint)
 {
     if (__CLASS__ !== $joinPoint->getClassName()) {
         return parent::Flow_Aop_Proxy_invokeJoinPoint($joinPoint);
     }
     if (isset($this->Flow_Aop_Proxy_methodIsInAdviceMode[$joinPoint->getMethodName()])) {
         return call_user_func_array(['self', $joinPoint->getMethodName()], $joinPoint->getMethodArguments());
     }
 }
 /**
  * Passes the signal over to the Dispatcher
  *
  * @Flow\AfterReturning("methodAnnotatedWith(Neos\Flow\Annotations\Signal)")
  * @param JoinPointInterface $joinPoint The current join point
  * @return void
  */
 public function forwardSignalToDispatcher(JoinPointInterface $joinPoint)
 {
     $signalName = lcfirst(str_replace('emit', '', $joinPoint->getMethodName()));
     $this->dispatcher->dispatch($joinPoint->getClassName(), $signalName, $joinPoint->getMethodArguments());
 }
 /**
  * Logs calls and results of the authenticate() method of an authentication provider
  *
  * @Flow\AfterReturning("within(Neos\Flow\Security\Authentication\AuthenticationProviderInterface) && method(.*->authenticate())")
  * @param JoinPointInterface $joinPoint The current joinpoint
  * @return mixed The result of the target method if it has not been intercepted
  */
 public function logPersistedUsernamePasswordProviderAuthenticate(JoinPointInterface $joinPoint)
 {
     $token = $joinPoint->getMethodArgument('authenticationToken');
     switch ($token->getAuthenticationStatus()) {
         case TokenInterface::AUTHENTICATION_SUCCESSFUL:
             $this->securityLogger->log(sprintf('Successfully authenticated token: %s', $token), LOG_NOTICE, [], 'Neos.Flow', $joinPoint->getClassName(), $joinPoint->getMethodName());
             $this->alreadyLoggedAuthenticateCall = true;
             break;
         case TokenInterface::WRONG_CREDENTIALS:
             $this->securityLogger->log(sprintf('Wrong credentials given for token: %s', $token), LOG_WARNING, [], 'Neos.Flow', $joinPoint->getClassName(), $joinPoint->getMethodName());
             break;
         case TokenInterface::NO_CREDENTIALS_GIVEN:
             $this->securityLogger->log(sprintf('No credentials given or no account found for token: %s', $token), LOG_WARNING, [], 'Neos.Flow', $joinPoint->getClassName(), $joinPoint->getMethodName());
             break;
     }
 }
 /**
  * Determines the short or full class name of the session implementation
  *
  * @param JoinPointInterface $joinPoint
  * @return string
  */
 protected function getClassName(JoinPointInterface $joinPoint)
 {
     $className = $joinPoint->getClassName();
     if (strpos($className, \Neos\Flow\Session::class) === 0) {
         $className = trim(substr($className, strlen(\Neos\Flow\Session::class)), '\\');
     }
     return $className;
 }
Beispiel #6
0
 /**
  * Determines the short or full class name of the session implementation
  *
  * @param JoinPointInterface $joinPoint
  * @return string
  */
 protected function getClassName(JoinPointInterface $joinPoint)
 {
     $className = $joinPoint->getClassName();
     $sessionNamespace = substr(SessionInterface::class, 0, -strrpos(SessionInterface::class, '\\') + 1);
     if (strpos($className, $sessionNamespace) === 0) {
         $className = substr($className, strlen($sessionNamespace));
     }
     return $className;
 }