当前位置: 首页>>代码示例>>PHP>>正文


PHP Operation::Load方法代码示例

本文整理汇总了PHP中Operation::Load方法的典型用法代码示例。如果您正苦于以下问题:PHP Operation::Load方法的具体用法?PHP Operation::Load怎么用?PHP Operation::Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Operation的用法示例。


在下文中一共展示了Operation::Load方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: SetupOperation

 protected function SetupOperation()
 {
     // Lookup Object PK information from Query String (if applicable)
     // Set mode to Edit or New depending on what's found
     $intId = QApplication::QueryString('intId');
     if ($intId) {
         $this->objOperation = Operation::Load($intId);
         if (!$this->objOperation) {
             throw new Exception('Could not find a Operation object with PK arguments: ' . $intId);
         }
         $this->strTitleVerb = QApplication::Translate('Edit');
         $this->blnEditMode = true;
     } else {
         $this->objOperation = new Operation();
         $this->strTitleVerb = QApplication::Translate('Create');
         $this->blnEditMode = false;
     }
 }
开发者ID:qcodo,项目名称:qcodo-api,代码行数:18,代码来源:OperationEditFormBase.class.php

示例2: __get

 /**
  * Override method to perform a property "Get"
  * This will get the value of $strName
  *
  * @param string $strName Name of the property to get
  * @return mixed
  */
 public function __get($strName)
 {
     switch ($strName) {
         ///////////////////
         // Member Variables
         ///////////////////
         case 'Id':
             /**
              * Gets the value for intId (Read-Only PK)
              * @return integer
              */
             return $this->intId;
         case 'OperationId':
             /**
              * Gets the value for intOperationId (Not Null)
              * @return integer
              */
             return $this->intOperationId;
         case 'OrderNumber':
             /**
              * Gets the value for intOrderNumber 
              * @return integer
              */
             return $this->intOrderNumber;
         case 'VariableId':
             /**
              * Gets the value for intVariableId (Unique)
              * @return integer
              */
             return $this->intVariableId;
         case 'ReferenceFlag':
             /**
              * Gets the value for blnReferenceFlag 
              * @return boolean
              */
             return $this->blnReferenceFlag;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'Operation':
             /**
              * Gets the value for the Operation object referenced by intOperationId (Not Null)
              * @return Operation
              */
             try {
                 if (!$this->objOperation && !is_null($this->intOperationId)) {
                     $this->objOperation = Operation::Load($this->intOperationId);
                 }
                 return $this->objOperation;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Variable':
             /**
              * Gets the value for the Variable object referenced by intVariableId (Unique)
              * @return Variable
              */
             try {
                 if (!$this->objVariable && !is_null($this->intVariableId)) {
                     $this->objVariable = Variable::Load($this->intVariableId);
                 }
                 return $this->objVariable;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             ////////////////////////////
             // Virtual Object References (Many to Many and Reverse References)
             // (If restored via a "Many-to" expansion)
             ////////////////////////////
         ////////////////////////////
         // Virtual Object References (Many to Many and Reverse References)
         // (If restored via a "Many-to" expansion)
         ////////////////////////////
         default:
             try {
                 return parent::__get($strName);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
开发者ID:qcodo,项目名称:qcodo-api,代码行数:94,代码来源:ParameterGen.class.php

示例3: SelectItem

 protected function SelectItem($strItemId)
 {
     $objItem = $this->tnvNavigation->GetItem($strItemId);
     /*			if (!$objItem) {
     				$intQcodoClassId = (integer) $strItemId;
     				$objClass = QcodoClass::Load($intQcodoClassId);
     				$this->tnvNavigation->GetItem('g' . $objClass->ClassGroupId)->Expanded = true;
     				$this->tnvNavigation->GetItem($objClass->Id)->Expanded = true;
     				$this->tnvNavigation->GetItem(substr($strItemId, 0, strlen($objClass->Id) + 1))->Expanded = true;
     				$objItem = $this->tnvNavigation->GetItem($strItemId);
     			}*/
     $this->tnvNavigation->SelectedItem = $objItem;
     if ($this->tnvNavigation->SelectedItem) {
         $objQcodoClass = QcodoClass::Load($strItemId);
         if (!$objQcodoClass->FileId) {
             QApplication::DisplayAlert('Please refer to the PHP Website (www.php.net) for documentation on the "' . $objQcodoClass->Name . '" class.');
             return;
         }
         $this->pnlDocumentation->RemoveChildControls(true);
         $strItemId = $this->tnvNavigation->SelectedItem->Value;
         if ($intPosition = strpos($strItemId, 'm')) {
             $intOperationId = substr($strItemId, $intPosition + 1);
             if ($intOperationId) {
                 new MethodPanel(Operation::Load($intOperationId), $this->pnlDocumentation);
             } else {
                 new MethodPanel(QcodoClass::Load($strItemId), $this->pnlDocumentation);
             }
         } else {
             if ($intPosition = strpos($strItemId, 'p')) {
                 new PropertyPanel(QcodoClass::Load($strItemId), $this->pnlDocumentation);
             } else {
                 if ($intPosition = strpos($strItemId, 'v')) {
                     new VariablePanel(QcodoClass::Load($strItemId), $this->pnlDocumentation);
                 } else {
                     if ($intPosition = strpos($strItemId, 'c')) {
                         new ConstantPanel(QcodoClass::Load($strItemId), $this->pnlDocumentation);
                     } else {
                         new ClassPanel(QcodoClass::Load($strItemId), $this->pnlDocumentation);
                     }
                 }
             }
         }
     }
 }
开发者ID:qcodo,项目名称:qcodo-api,代码行数:44,代码来源:index.php

示例4: btnEdit_Click

 public function btnEdit_Click($strFormId, $strControlId, $strParameter)
 {
     $strParameterArray = explode(',', $strParameter);
     $objOperation = Operation::Load($strParameterArray[0]);
     $objEditPanel = new OperationEditPanel($this, $this->strCloseEditPanelMethod, $objOperation);
     $strMethodName = $this->strSetEditPanelMethod;
     $this->objForm->{$strMethodName}($objEditPanel);
 }
开发者ID:qcodo,项目名称:qcodo-api,代码行数:8,代码来源:OperationListPanelBase.class.php

示例5: Form_Create

 protected function Form_Create()
 {
     if (!QApplication::$Login) {
         QApplication::Redirect('/');
     }
     $this->objOperation = Operation::Load(QApplication::PathInfo(0));
     if (!$this->objOperation) {
         throw new Exception('Invalid Operation Id: ' . QApplication::PathInfo(0));
     }
     $this->lblClass = new QLabel($this);
     if ($this->objOperation->QcodoClass) {
         $this->lblClass->Text = $this->objOperation->QcodoClass->Name;
     } else {
         $this->lblClass->Text = 'Global Function';
     }
     $this->lblName = new QLabel($this);
     $this->lblName->Text = $this->objOperation->Name . '()';
     $this->cblAdditional = new QCheckBoxList($this);
     $this->cblAdditional->RepeatDirection = QRepeatDirection::Horizontal;
     $this->cblAdditional->RepeatColumns = 2;
     $this->cblAdditional->Name = 'Additional Parameters for this Method';
     $this->litReturn = new QListItem('Return Parameter', 1, $this->objOperation->ReturnVariable);
     $this->litAdditional = new QListItem('Optional Additional Input Parameters', 2, $this->objOperation->AdditionalVariable);
     $this->cblAdditional->AddItem($this->litReturn);
     $this->cblAdditional->AddItem($this->litAdditional);
     $this->cblAdditional->AddAction(new QClickEvent(), new QAjaxAction('cblAdditional_Click'));
     if ($this->objOperation->ReturnVariable) {
         $this->ctlReturnVariable = new VariableControl($this, $this->objOperation->ReturnVariable, false, false);
     } else {
         $objVariable = new Variable();
         $objVariable->Name = '[return parameter]';
         $this->ctlReturnVariable = new VariableControl($this, $objVariable, false, false);
         $this->ctlReturnVariable->Visible = false;
     }
     if ($this->objOperation->AdditionalVariable) {
         $this->ctlAdditionalVariable = new VariableControl($this, $this->objOperation->AdditionalVariable, false, false);
     } else {
         $objVariable = new Variable();
         $objVariable->Name = '[additional parameters...]';
         $this->ctlAdditionalVariable = new VariableControl($this, $objVariable, false, false);
         $this->ctlAdditionalVariable->Visible = false;
     }
     foreach ($this->objOperation->Parameters as $objParameter) {
         $ctlParameter = new VariableControl($this, $objParameter, false, false);
         array_push($this->ctlParameterArray, $ctlParameter);
     }
     $this->txtShortDescription = new QTextBox($this);
     $this->txtShortDescription->Name = QApplication::Translate('Short Description');
     $this->txtShortDescription->Text = $this->objOperation->ShortDescription;
     $this->txtShortDescription->TextMode = QTextMode::MultiLine;
     $this->txtExtendedDescription = new QWriteBox($this);
     $this->txtExtendedDescription->Name = QApplication::Translate('Extended Description');
     $this->txtExtendedDescription->Text = $this->objOperation->ExtendedDescription;
     $this->btnSave = new QButton($this);
     $this->btnSave->Text = 'Save';
     $this->btnSave->AddAction(new QClickEvent(), new QServerAction('btnSave_Click'));
     $this->btnSave->CausesValidation = true;
     $this->btnCancel = new QButton($this);
     $this->btnCancel->Text = 'Cancel';
     $this->btnCancel->AddAction(new QClickEvent(), new QServerAction('btnCancel_Click'));
     $this->btnCancel->CausesValidation = false;
 }
开发者ID:qcodo,项目名称:qcodo-api,代码行数:62,代码来源:edit_operation.php


注:本文中的Operation::Load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。