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


PHP ObjectManagerInterface::getCaseSensitiveObjectName方法代码示例

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


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

示例1: resolveProviderClass

 /**
  * Resolves the class name of an authentication provider. If a valid provider class name is given, it is just returned.
  *
  * @param string $providerName The (short) name of the provider
  * @return string The object name of the authentication provider
  * @throws \TYPO3\Flow\Security\Exception\NoAuthenticationProviderFoundException
  */
 public function resolveProviderClass($providerName)
 {
     $resolvedObjectName = $this->objectManager->getCaseSensitiveObjectName($providerName);
     if ($resolvedObjectName !== false) {
         return $resolvedObjectName;
     }
     $resolvedObjectName = $this->objectManager->getCaseSensitiveObjectName('TYPO3\\Flow\\Security\\Authentication\\Provider\\' . $providerName);
     if ($resolvedObjectName !== false) {
         return $resolvedObjectName;
     }
     throw new \TYPO3\Flow\Security\Exception\NoAuthenticationProviderFoundException('An authentication provider with the name "' . $providerName . '" could not be resolved.', 1217154134);
 }
开发者ID:robertlemke,项目名称:flow-development-collection,代码行数:19,代码来源:AuthenticationProviderResolver.php

示例2: resolveInterceptorClass

 /**
  * Resolves the class name of a security interceptor. If a valid interceptor class name is given, it is just returned.
  *
  * @param string $name The (short) name of the interceptor
  * @return string The class name of the security interceptor, NULL if no class was found.
  * @throws \TYPO3\Flow\Security\Exception\NoInterceptorFoundException
  */
 public function resolveInterceptorClass($name)
 {
     $resolvedObjectName = $this->objectManager->getCaseSensitiveObjectName($name);
     if ($resolvedObjectName !== false) {
         return $resolvedObjectName;
     }
     $resolvedObjectName = $this->objectManager->getCaseSensitiveObjectName('TYPO3\\Flow\\Security\\Authorization\\Interceptor\\' . $name);
     if ($resolvedObjectName !== false) {
         return $resolvedObjectName;
     }
     throw new \TYPO3\Flow\Security\Exception\NoInterceptorFoundException('A security interceptor with the name: "' . $name . '" could not be resolved.', 1217154134);
 }
开发者ID:robertlemke,项目名称:flow-development-collection,代码行数:19,代码来源:InterceptorResolver.php

示例3: resolveRequestPatternClass

 /**
  * Resolves the class name of a request pattern. If a valid request pattern class name is given, it is just returned.
  *
  * @param string $name The (short) name of the pattern
  * @return string The class name of the request pattern, NULL if no class was found.
  * @throws \TYPO3\Flow\Security\Exception\NoRequestPatternFoundException
  */
 public function resolveRequestPatternClass($name)
 {
     $resolvedObjectName = $this->objectManager->getCaseSensitiveObjectName($name);
     if ($resolvedObjectName !== FALSE) {
         return $resolvedObjectName;
     }
     $resolvedObjectName = $this->objectManager->getCaseSensitiveObjectName('TYPO3\\Flow\\Security\\RequestPattern\\' . $name);
     if ($resolvedObjectName !== FALSE) {
         return $resolvedObjectName;
     }
     throw new \TYPO3\Flow\Security\Exception\NoRequestPatternFoundException('A request pattern with the name: "' . $name . '" could not be resolved.', 1217154134);
 }
开发者ID:nlx-sascha,项目名称:flow-development-collection,代码行数:19,代码来源:RequestPatternResolver.php

示例4: getControllerObjectName

 /**
  * Merge the default plugin arguments of the Plugin with the arguments in the request
  * and generate a controllerObjectName
  *
  * @param object $request
  * @param array $arguments
  * @return string $controllerObjectName
  */
 public function getControllerObjectName($request, array $arguments)
 {
     $controllerName = $arguments['controllerName'] !== null ? $arguments['controllerName'] : $request->getControllerName();
     $subPackageKey = $arguments['subPackageKey'] !== null ? $arguments['subPackageKey'] : $request->getControllerSubpackageKey();
     $packageKey = $arguments['packageKey'] !== null ? $arguments['packageKey'] : $request->getControllerPackageKey();
     $possibleObjectName = '@package\\@subpackage\\Controller\\@controllerController';
     $possibleObjectName = str_replace('@package', str_replace('.', '\\', $packageKey), $possibleObjectName);
     $possibleObjectName = str_replace('@subpackage', $subPackageKey, $possibleObjectName);
     $possibleObjectName = str_replace('@controller', $controllerName, $possibleObjectName);
     $possibleObjectName = str_replace('\\\\', '\\', $possibleObjectName);
     $controllerObjectName = $this->objectManager->getCaseSensitiveObjectName($possibleObjectName);
     return $controllerObjectName !== false ? $controllerObjectName : '';
 }
开发者ID:testbird,项目名称:neos-development-collection,代码行数:21,代码来源:PluginUriAspect.php

示例5: getControllerObjectName

 /**
  * Returns the object name of the controller defined by the package, subpackage key and
  * controller name
  *
  * @param string $packageKey the package key of the controller
  * @param string $subPackageKey the subpackage key of the controller
  * @param string $controllerName the controller name excluding the "Controller" suffix
  * @return string The controller's Object Name or NULL if the controller does not exist
  */
 protected function getControllerObjectName($packageKey, $subPackageKey, $controllerName)
 {
     $possibleObjectName = '@package\\@subpackage\\Controller\\@controllerController';
     $possibleObjectName = str_replace('@package', str_replace('.', '\\', $packageKey), $possibleObjectName);
     $possibleObjectName = str_replace('@subpackage', $subPackageKey, $possibleObjectName);
     $possibleObjectName = str_replace('@controller', $controllerName, $possibleObjectName);
     $possibleObjectName = str_replace('\\\\', '\\', $possibleObjectName);
     $controllerObjectName = $this->objectManager->getCaseSensitiveObjectName($possibleObjectName);
     return $controllerObjectName !== false ? $controllerObjectName : null;
 }
开发者ID:kszyma,项目名称:flow-development-collection,代码行数:19,代码来源:RoutingCommandController.php

示例6: getControllerObjectName

 /**
  * Returns the object name of the controller defined by the package, subpackage key and
  * controller name
  *
  * @param string $packageKey the package key of the controller
  * @param string $subPackageKey the subpackage key of the controller
  * @param string $controllerName the controller name excluding the "Controller" suffix
  * @return string The controller's Object Name or NULL if the controller does not exist
  * @api
  */
 public function getControllerObjectName($packageKey, $subPackageKey, $controllerName)
 {
     $possibleObjectName = $this->controllerObjectNamePattern;
     $possibleObjectName = str_replace('@package', str_replace('.', '\\', $packageKey), $possibleObjectName);
     $possibleObjectName = str_replace('@subpackage', $subPackageKey, $possibleObjectName);
     $possibleObjectName = str_replace('@controller', $controllerName, $possibleObjectName);
     $possibleObjectName = str_replace('\\\\', '\\', $possibleObjectName);
     $controllerObjectName = $this->objectManager->getCaseSensitiveObjectName($possibleObjectName);
     return $controllerObjectName !== FALSE ? $controllerObjectName : NULL;
 }
开发者ID:animaltool,项目名称:webinterface,代码行数:20,代码来源:Router.php

示例7: resolveTransformationClassName

 /**
  * Tries to resolve the given transformation name into a class name.
  *
  * The name can be a fully qualified class name or a name relative to the
  * TYPO3\TYPO3CR\Migration\Transformations namespace.
  *
  * @param string $transformationName
  * @return string
  * @throws \TYPO3\TYPO3CR\Migration\Exception\MigrationException
  */
 protected function resolveTransformationClassName($transformationName)
 {
     $resolvedObjectName = $this->objectManager->getCaseSensitiveObjectName($transformationName);
     if ($resolvedObjectName !== false) {
         return $resolvedObjectName;
     }
     $resolvedObjectName = $this->objectManager->getCaseSensitiveObjectName('TYPO3\\TYPO3CR\\Migration\\Transformations\\' . $transformationName);
     if ($resolvedObjectName !== false) {
         return $resolvedObjectName;
     }
     throw new \TYPO3\TYPO3CR\Migration\Exception\MigrationException('A transformation with the name "' . $transformationName . '" could not be found.', 1343293064);
 }
开发者ID:mgoldbeck,项目名称:neos-development-collection,代码行数:22,代码来源:NodeTransformation.php

示例8: resolveFilterClass

 /**
  * Resolves the class name for the filter by first assuming it is a full qualified class name and otherwise searching
  * in this package (so filters delivered in TYPO3.TYPO3CR can be used by simply giving the class name without namespace).
  *
  * @param string $name
  * @return string
  * @throws MigrationException
  */
 protected function resolveFilterClass($name)
 {
     $resolvedObjectName = $this->objectManager->getCaseSensitiveObjectName($name);
     if ($resolvedObjectName !== false) {
         return $resolvedObjectName;
     }
     $resolvedObjectName = $this->objectManager->getCaseSensitiveObjectName('TYPO3\\TYPO3CR\\Migration\\Filters\\' . $name);
     if ($resolvedObjectName !== false) {
         return $resolvedObjectName;
     }
     throw new MigrationException('A filter with the name "' . $name . '" could not be found.', 1343199467);
 }
开发者ID:robertlemke,项目名称:neos-development-collection,代码行数:20,代码来源:NodeFilter.php

示例9: setControllerObjectName

    /**
     * Explicitly sets the object name of the controller
     *
     * @param string $unknownCasedControllerObjectName The fully qualified controller object name
     * @return void
     * @throws \TYPO3\Flow\Object\Exception\UnknownObjectException
     * @api
     */
    public function setControllerObjectName($unknownCasedControllerObjectName)
    {
        $controllerObjectName = $this->objectManager->getCaseSensitiveObjectName($unknownCasedControllerObjectName);
        if ($controllerObjectName === false) {
            throw new UnknownObjectException('The object "' . $unknownCasedControllerObjectName . '" is not registered.', 1268844071);
        }
        $this->controllerPackageKey = $this->objectManager->getPackageKeyByObjectName($controllerObjectName);
        $matches = array();
        $subject = substr($controllerObjectName, strlen($this->controllerPackageKey) + 1);
        preg_match('/
			^(
				Controller
			|
				(?P<subpackageKey>.+)\\\\Controller
			)
			\\\\(?P<controllerName>[a-z\\\\]+)Controller
			$/ix', $subject, $matches);
        $this->controllerSubpackageKey = isset($matches['subpackageKey']) ? $matches['subpackageKey'] : null;
        $this->controllerName = $matches['controllerName'];
    }
开发者ID:patrickreck,项目名称:flow-development-collection,代码行数:28,代码来源:ActionRequest.php

示例10: resolveViewObjectName

 /**
  * Determines the fully qualified view object name.
  *
  * @return mixed The fully qualified view object name or FALSE if no matching view could be found.
  * @api
  */
 protected function resolveViewObjectName()
 {
     $possibleViewObjectName = $this->viewObjectNamePattern;
     $packageKey = $this->request->getControllerPackageKey();
     $subpackageKey = $this->request->getControllerSubpackageKey();
     $format = $this->request->getFormat();
     if ($subpackageKey !== NULL && $subpackageKey !== '') {
         $packageKey .= '\\' . $subpackageKey;
     }
     $possibleViewObjectName = str_replace('@package', str_replace('.', '\\', $packageKey), $possibleViewObjectName);
     $possibleViewObjectName = str_replace('@controller', $this->request->getControllerName(), $possibleViewObjectName);
     $possibleViewObjectName = str_replace('@action', $this->request->getControllerActionName(), $possibleViewObjectName);
     $viewObjectName = $this->objectManager->getCaseSensitiveObjectName(strtolower(str_replace('@format', $format, $possibleViewObjectName)));
     if ($viewObjectName === FALSE) {
         $viewObjectName = $this->objectManager->getCaseSensitiveObjectName(strtolower(str_replace('@format', '', $possibleViewObjectName)));
     }
     if ($viewObjectName === FALSE && isset($this->viewFormatToObjectNameMap[$format])) {
         $viewObjectName = $this->viewFormatToObjectNameMap[$format];
     }
     return $viewObjectName;
 }
开发者ID:sakona999,项目名称:flow-login,代码行数:27,代码来源:ActionController.php

示例11: showMethodsForResourceCommand

 /**
  * Shows the methods represented by the given security resource
  *
  * @param string $resourceName The name of the resource as stated in the policy
  * @return void
  */
 public function showMethodsForResourceCommand($resourceName)
 {
     if ($this->policyCache->has('acls')) {
         $classes = array();
         $acls = $this->policyCache->get('acls');
         foreach ($acls as $classAndMethodName => $aclEntry) {
             if (strpos($classAndMethodName, '->') === FALSE) {
                 continue;
             }
             list($className, $methodName) = explode('->', $classAndMethodName);
             $className = $this->objectManager->getCaseSensitiveObjectName($className);
             $reflectionClass = new \ReflectionClass($className);
             foreach ($reflectionClass->getMethods() as $casSensitiveMethodName) {
                 if ($methodName === strtolower($casSensitiveMethodName->getName())) {
                     $methodName = $casSensitiveMethodName->getName();
                     break;
                 }
             }
             foreach ($aclEntry as $resources) {
                 if (array_key_exists($resourceName, $resources)) {
                     $classes[$className][$methodName] = $methodName;
                     break;
                 }
             }
         }
         if (count($classes) === 0) {
             $this->outputLine('The given Resource did not match any method or is unknown.');
             $this->quit(1);
         }
         foreach ($classes as $className => $methods) {
             $this->outputLine(PHP_EOL . $className);
             foreach ($methods as $methodName) {
                 $this->outputLine('  ' . $methodName);
             }
         }
     } else {
         $this->outputLine('Could not find any policy entries, please warmup caches!');
     }
 }
开发者ID:sokunthearith,项目名称:Intern-Project-Week-2,代码行数:45,代码来源:SecurityCommandController.php

示例12: initializeViewHelperAndAddItToStack

 /**
  * Initialize the given ViewHelper and adds it to the current node and to
  * the stack.
  *
  * @param ParsingState $state Current parsing state
  * @param string $namespaceIdentifier Namespace identifier - being looked up in $this->namespaces
  * @param string $methodIdentifier Method identifier
  * @param array $argumentsObjectTree Arguments object tree
  * @return boolean whether the viewHelper was found and added to the stack or not
  * @throws Exception
  */
 protected function initializeViewHelperAndAddItToStack(ParsingState $state, $namespaceIdentifier, $methodIdentifier, $argumentsObjectTree)
 {
     if ($this->isNamespaceValid($namespaceIdentifier, $methodIdentifier) === FALSE) {
         return FALSE;
     }
     $resolvedViewHelperClassName = $this->resolveViewHelperName($namespaceIdentifier, $methodIdentifier);
     $actualViewHelperClassName = $this->objectManager->getCaseSensitiveObjectName($resolvedViewHelperClassName);
     if ($actualViewHelperClassName === FALSE) {
         throw new Exception(sprintf('The ViewHelper "<%s:%s>" could not be resolved.' . chr(10) . 'Based on your spelling, the system would load the class "%s", however this class does not exist.', $namespaceIdentifier, $methodIdentifier, $resolvedViewHelperClassName), 1407060572);
     } elseif ($actualViewHelperClassName !== $resolvedViewHelperClassName) {
         throw new Exception(sprintf('The ViewHelper "<%s:%s>" inside your template is not written correctly upper/lowercased.' . chr(10) . 'Based on your spelling, the system would load the (non-existant) class "%s", however the real class name is "%s".' . chr(10) . 'This error can be fixed by making sure the ViewHelper is written in the correct upper/lowercase form.', $namespaceIdentifier, $methodIdentifier, $resolvedViewHelperClassName, $actualViewHelperClassName), 1407060573);
     }
     $viewHelper = $this->objectManager->get($actualViewHelperClassName);
     // The following three checks are only done *in an uncached template*, and not needed anymore in the cached version
     $expectedViewHelperArguments = $viewHelper->prepareArguments();
     $this->abortIfUnregisteredArgumentsExist($expectedViewHelperArguments, $argumentsObjectTree);
     $this->abortIfRequiredArgumentsAreMissing($expectedViewHelperArguments, $argumentsObjectTree);
     $this->rewriteBooleanNodesInArgumentsObjectTree($expectedViewHelperArguments, $argumentsObjectTree);
     /** @var $currentViewHelperNode ViewHelperNode */
     $currentViewHelperNode = $this->objectManager->get(\TYPO3\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class, $viewHelper, $argumentsObjectTree);
     $this->callInterceptor($currentViewHelperNode, InterceptorInterface::INTERCEPT_OPENING_VIEWHELPER, $state);
     if ($viewHelper instanceof ChildNodeAccessInterface && !$viewHelper instanceof CompilableInterface) {
         $state->setCompilable(FALSE);
     }
     // PostParse Facet
     if ($viewHelper instanceof PostParseInterface) {
         // Don't just use $viewHelper::postParseEvent(...),
         // as this will break with PHP < 5.3.
         call_user_func(array($viewHelper, 'postParseEvent'), $currentViewHelperNode, $argumentsObjectTree, $state->getVariableContainer());
     }
     $state->pushNodeToStack($currentViewHelperNode);
     return TRUE;
 }
开发者ID:nlx-sascha,项目名称:flow-development-collection,代码行数:44,代码来源:TemplateParser.php


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