當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Operation::QuerySingle方法代碼示例

本文整理匯總了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;
 }
開發者ID:qcodo,項目名稱:qcodo-api,代碼行數:26,代碼來源:Operation.class.php

示例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;
 }
開發者ID:qcodo,項目名稱:qcodo-api,代碼行數:40,代碼來源:index.php

示例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)));
 }
開發者ID:qcodo,項目名稱:qcodo-api,代碼行數:12,代碼來源:OperationGen.class.php


注:本文中的Operation::QuerySingle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。