本文整理汇总了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;
}
示例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;
}