当前位置: 首页>>代码示例>>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;未经允许,请勿转载。