本文整理汇总了PHP中QConvertNotation::WordsFromCamelCase方法的典型用法代码示例。如果您正苦于以下问题:PHP QConvertNotation::WordsFromCamelCase方法的具体用法?PHP QConvertNotation::WordsFromCamelCase怎么用?PHP QConvertNotation::WordsFromCamelCase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QConvertNotation
的用法示例。
在下文中一共展示了QConvertNotation::WordsFromCamelCase方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MetaAddTypeColumn
/**
* Similar to MetaAddColumn, except it creates a column for a Type-based Id. You MUST specify
* the name of the Type class that this will attempt to use $NameArray against.
*
* Also, $mixContent cannot be an array. Only a single field can be specified.
*
* @param mixed $mixContent string or QQNode from Country
* @param string $strTypeClassName the name of the TypeClass to use $NameArray against
* @param mixed $objOverrideParameters
*/
public function MetaAddTypeColumn($mixContent, $strTypeClassName, $objOverrideParameters = null)
{
// Validate TypeClassName
if (!class_exists($strTypeClassName) || !property_exists($strTypeClassName, 'NameArray')) {
throw new QCallerException('Invalid TypeClass Name: ' . $strTypeClassName);
}
// Validate Node
try {
$objNode = $this->ResolveContentItem($mixContent);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
// Create the Column
$strName = QConvertNotation::WordsFromCamelCase($objNode->_PropertyName);
if (strtolower(substr($strName, strlen($strName) - 3)) == ' id') {
$strName = substr($strName, 0, strlen($strName) - 3);
}
$strProperty = $objNode->GetDataGridHtml();
$objNewColumn = new QDataGridColumn(QApplication::Translate($strName), sprintf('<?=(%s) ? %s::$NameArray[%s] : null;?>', $strProperty, $strTypeClassName, $strProperty), array('OrderByClause' => QQ::OrderBy($objNode), 'ReverseOrderByClause' => QQ::OrderBy($objNode, false)));
// Perform Overrides
$objOverrideArray = func_get_args();
if (count($objOverrideArray) > 2) {
try {
unset($objOverrideArray[0]);
unset($objOverrideArray[1]);
$objNewColumn->OverrideAttributes($objOverrideArray);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
}
$this->AddColumn($objNewColumn);
return $objNewColumn;
}
示例2: _Create
* @param string $strControlId optional ControlId to use
* @return QLabel
*/
public function <?php
echo $strLabelId;
?>
_Create($strControlId = null) {
$this-><?php
echo $strLabelId;
?>
= new QLabel($this->objParentObject, $strControlId);
$this-><?php
echo $strLabelId;
?>
->Name = QApplication::Translate('<?php
echo QConvertNotation::WordsFromCamelCase($objReverseReference->ObjectPropertyName);
?>
');
$this-><?php
echo $strLabelId;
?>
->Text = ($this-><?php
echo $strObjectName;
?>
-><?php
echo $objReverseReference->ObjectPropertyName;
?>
) ? $this-><?php
echo $strObjectName;
?>
-><?php
示例3: _Create
* @param string $strControlId optional ControlId to use
* @return QLabel
*/
public function <?php
echo $strLabelId;
?>
_Create($strControlId = null) {
$this-><?php
echo $strLabelId;
?>
= new QLabel($this->objParentObject, $strControlId);
$this-><?php
echo $strLabelId;
?>
->Name = QApplication::Translate('<?php
echo QConvertNotation::WordsFromCamelCase($objManyToManyReference->ObjectDescriptionPlural);
?>
');
$aSelection = $this-><?php
echo $strObjectName;
?>
->Get<?php
echo $objManyToManyReference->ObjectDescription;
?>
Array();
$this-><?php
echo $strLabelId;
?>
->Text = implode($this->str<?php
echo $objManyToManyReference->ObjectDescription;
示例4: DataListItemName
/**
* Returns the name of an item in the data list as will be displayed in the edit panel.
*
* @param QSqlTable $objTable
*
* @return string
*/
public static function DataListItemName(QSqlTable $objTable)
{
if (($o = $objTable->Options) && isset($o['ItemName'])) {
// Did developer override?
return $o['ItemName'];
}
return QConvertNotation::WordsFromCamelCase($objTable->ClassName);
}
示例5: _Create
* @param string $strControlId optional ControlId to use
* @return QLabel
*/
public function <?php
echo $strLabelId;
?>
_Create($strControlId = null) {
$this-><?php
echo $strLabelId;
?>
= new QLabel($this->objParentObject, $strControlId);
$this-><?php
echo $strLabelId;
?>
->Name = QApplication::Translate('<?php
echo QConvertNotation::WordsFromCamelCase($objColumn->Reference->PropertyName);
?>
');
$this-><?php
echo $strLabelId;
?>
->Text = ($this-><?php
echo $strObjectName;
?>
-><?php
echo $objColumn->Reference->PropertyName;
?>
) ? $this-><?php
echo $strObjectName;
?>
-><?php
示例6: MetaControlLabelNameFromColumn
/**
* The function determines whether there is a comment on the column or not.
* If yes, and the settings for the database has the option for using comments for Meta Control label names turned on
* along with a preferred delimiter supplied, then the function will return the computed meta control label name. Otherwise it
* just returns the PropertyName of the column.
*
* @param QColumn $objColumn
*
* @internal param string $strDelimiter
* @return string
*/
public static function MetaControlLabelNameFromColumn(QColumn $objColumn)
{
$strDelimiter = null;
$objTable = $objColumn->OwnerTable;
$objDbIndex = $objTable->OwnerDbIndex;
foreach (QCodeGen::$CodeGenArray as $DatabaseCodeGen) {
if ($DatabaseCodeGen instanceof QDatabaseCodeGen && $DatabaseCodeGen->DatabaseIndex == $objDbIndex) {
$strDelimiter = $DatabaseCodeGen->CommentMetaControlLabelDelimiter;
break;
}
}
if (trim($strDelimiter) == '') {
$strDelimiter = null;
}
if ($strDelimiter && $objColumn->Comment && ($strLabelText = strstr($objColumn->Comment, $strDelimiter, true))) {
return str_replace("'", "\\'", $strLabelText);
}
return QConvertNotation::WordsFromCamelCase($objColumn->PropertyName);
}