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


PHP Util::underscoredToUpperCamelCase方法代码示例

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


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

示例1: loadViewHelper

 protected function loadViewHelper($helperKey)
 {
     if (isset($this->loadedHelperFiles[strtolower($helperKey)])) {
         return $this->loadedHelperFiles[strtolower($helperKey)]['class'];
     }
     foreach ($this->viewHelperIncludePath as $extensionKey => $viewHelperPath) {
         $viewHelperRealPath = $viewHelperPath;
         if (GeneralUtility::isFirstPartOfStr($viewHelperPath, 'Classes/')) {
             $viewHelperRealPath = substr($viewHelperPath, 8);
         }
         if (substr($viewHelperRealPath, -1) == '/') {
             $viewHelperRealPath = substr($viewHelperRealPath, 0, -1);
         }
         $classNamePrefix = ExtensionManagementUtility::getCN($extensionKey);
         //FIXME for PHP 5.4.32, 5.5.16: $classNamePrefix = ucwords($classNamePrefix, '_');
         $classNamePrefix = explode('_', $classNamePrefix);
         $classNamePrefix = array_map('ucfirst', $classNamePrefix);
         $classNamePrefix = implode('_', $classNamePrefix);
         $possibleFilename = Util::underscoredToUpperCamelCase($helperKey) . '.php';
         $possibleClassName = $classNamePrefix . '_' . str_replace('/', '_', $viewHelperRealPath) . '_' . Util::underscoredToUpperCamelCase($helperKey);
         $viewHelperIncludePath = ExtensionManagementUtility::extPath($extensionKey) . $viewHelperPath . $possibleFilename;
         if (file_exists($viewHelperIncludePath)) {
             include_once $viewHelperIncludePath;
             $this->loadedHelperFiles[strtolower($helperKey)] = array('file' => $viewHelperIncludePath, 'class' => $possibleClassName);
             return $possibleClassName;
         }
     }
     // view helper could not be found
     return FALSE;
 }
开发者ID:nxpthx,项目名称:ext-solr,代码行数:30,代码来源:Template.php

示例2: loadViewHelper

 protected function loadViewHelper($helperKey)
 {
     if (isset($this->loadedHelperFiles[strtolower($helperKey)])) {
         return $this->loadedHelperFiles[strtolower($helperKey)]['class'];
     }
     foreach ($this->viewHelperIncludePath as $extensionKey => $viewHelperPath) {
         $viewHelperRealPath = $viewHelperPath;
         if (GeneralUtility::isFirstPartOfStr($viewHelperPath, 'Classes/')) {
             $viewHelperRealPath = substr($viewHelperPath, 8);
         }
         if (substr($viewHelperRealPath, -1) == '/') {
             $viewHelperRealPath = substr($viewHelperRealPath, 0, -1);
         }
         $ucHelperKey = Util::underscoredToUpperCamelCase($helperKey);
         $vendorNameSpace = 'ApacheSolrForTypo3\\Solr\\';
         $possibleFilename = $ucHelperKey . '.php';
         $possibleClassName = $vendorNameSpace . str_replace('/', '\\', $viewHelperRealPath) . '\\' . $ucHelperKey;
         $viewHelperIncludePath = ExtensionManagementUtility::extPath($extensionKey) . $viewHelperPath . $possibleFilename;
         if (file_exists($viewHelperIncludePath)) {
             include_once $viewHelperIncludePath;
             $this->loadedHelperFiles[strtolower($helperKey)] = array('file' => $viewHelperIncludePath, 'class' => $possibleClassName);
             return $possibleClassName;
         }
     }
     // view helper could not be found
     return false;
 }
开发者ID:sitegeist,项目名称:ext-solr,代码行数:27,代码来源:Template.php


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