本文整理汇总了PHP中Operation::QuerySingle方法的典型用法代码示例。如果您正苦于以下问题:PHP Operation::QuerySingle方法的具体用法?PHP Operation::QuerySingle怎么用?PHP Operation::QuerySingle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Operation
的用法示例。
在下文中一共展示了Operation::QuerySingle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RestoreByNameForClass
public static function RestoreByNameForClass($strName, $intClassId, $strVersion, $objFile)
{
$objOperation = Operation::QuerySingle(QQ::AndCondition(QQ::Equal(QQN::Operation()->QcodoClassId, $intClassId), QQ::Equal(QQN::Operation()->Name, $strName)));
if (!$objOperation) {
$objOperation = new Operation();
$objOperation->Name = $strName;
$objOperation->QcodoClassId = $intClassId;
$objOperation->FirstVersion = $strVersion;
$objOperation->File = $objFile;
$objOperation->Save();
} else {
$blnSave = false;
if ($objOperation->LastVersion) {
$objOperation->LastVersion = null;
$blnSave = true;
}
if ($objFile->Id != $objOperation->intFileId) {
$objOperation->File = $objFile;
$blnSave = true;
}
if ($blnSave) {
$objOperation->Save();
}
}
return $objOperation;
}
示例2: GetItemId
protected function GetItemId($strClassName, $strType = null, $strName = null)
{
$objClass = QcodoClass::LoadByName($strClassName);
if (!$objClass) {
return null;
}
$strToReturn = $objClass->Id;
$this->tnvNavigation->GetItem($objClass->Id)->Expanded = true;
switch (strtolower($strType)) {
case 'methods':
case 'functions':
if (count($objClass->Operations)) {
$strToReturn .= 'm';
$objOperation = Operation::QuerySingle(QQ::AndCondition(QQ::Equal(QQN::Operation()->QcodoClassId, $objClass->Id), QQ::Equal(QQN::Operation()->Name, $strName)));
if ($objOperation) {
$strToReturn .= $objOperation->Id;
}
}
break;
case 'properties':
if (count($objClass->GetPropertiesForVariableGroupId(null))) {
$strToReturn .= 'p';
}
break;
case 'variables':
case 'membervariables':
if (count($objClass->GetVariablesForVariableGroupId(null))) {
$strToReturn .= 'v';
}
break;
case 'constants':
if ($objClass->CountQcodoConstants()) {
$strToReturn .= 'c';
}
break;
default:
break;
}
return $strToReturn;
}
示例3: LoadByQcodoClassIdQcodoInterfaceIdName
/**
* Load a single Operation object,
* by QcodoClassId, QcodoInterfaceId, Name Index(es)
* @param integer $intQcodoClassId
* @param integer $intQcodoInterfaceId
* @param string $strName
* @return Operation
*/
public static function LoadByQcodoClassIdQcodoInterfaceIdName($intQcodoClassId, $intQcodoInterfaceId, $strName)
{
return Operation::QuerySingle(QQ::AndCondition(QQ::Equal(QQN::Operation()->QcodoClassId, $intQcodoClassId), QQ::Equal(QQN::Operation()->QcodoInterfaceId, $intQcodoInterfaceId), QQ::Equal(QQN::Operation()->Name, $strName)));
}