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


PHP QQN::ClassVariable方法代码示例

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


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

示例1: Form_Create

 protected function Form_Create()
 {
     // Setup DataGrid Columns
     $this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_FORM->dtgClassVariable_EditLinkColumn_Render($_ITEM) ?>');
     $this->colEditLinkColumn->HtmlEntities = false;
     $this->colId = new QDataGridColumn(QApplication::Translate('Id'), '<?= $_ITEM->Id; ?>', array('OrderByClause' => QQ::OrderBy(QQN::ClassVariable()->Id), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ClassVariable()->Id, false)));
     $this->colQcodoClassId = new QDataGridColumn(QApplication::Translate('Qcodo Class Id'), '<?= $_FORM->dtgClassVariable_QcodoClass_Render($_ITEM); ?>');
     $this->colVariableGroupId = new QDataGridColumn(QApplication::Translate('Variable Group Id'), '<?= $_FORM->dtgClassVariable_VariableGroup_Render($_ITEM); ?>');
     $this->colProtectionTypeId = new QDataGridColumn(QApplication::Translate('Protection Type'), '<?= $_FORM->dtgClassVariable_ProtectionTypeId_Render($_ITEM); ?>', array('OrderByClause' => QQ::OrderBy(QQN::ClassVariable()->ProtectionTypeId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ClassVariable()->ProtectionTypeId, false)));
     $this->colVariableId = new QDataGridColumn(QApplication::Translate('Variable Id'), '<?= $_FORM->dtgClassVariable_Variable_Render($_ITEM); ?>');
     $this->colReadOnlyFlag = new QDataGridColumn(QApplication::Translate('Read Only Flag'), '<?= ($_ITEM->ReadOnlyFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::ClassVariable()->ReadOnlyFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ClassVariable()->ReadOnlyFlag, false)));
     $this->colStaticFlag = new QDataGridColumn(QApplication::Translate('Static Flag'), '<?= ($_ITEM->StaticFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::ClassVariable()->StaticFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ClassVariable()->StaticFlag, false)));
     // Setup DataGrid
     $this->dtgClassVariable = new QDataGrid($this);
     $this->dtgClassVariable->CellSpacing = 0;
     $this->dtgClassVariable->CellPadding = 4;
     $this->dtgClassVariable->BorderStyle = QBorderStyle::Solid;
     $this->dtgClassVariable->BorderWidth = 1;
     $this->dtgClassVariable->GridLines = QGridLines::Both;
     // Datagrid Paginator
     $this->dtgClassVariable->Paginator = new QPaginator($this->dtgClassVariable);
     $this->dtgClassVariable->ItemsPerPage = 10;
     // Specify Whether or Not to Refresh using Ajax
     $this->dtgClassVariable->UseAjax = false;
     // Specify the local databind method this datagrid will use
     $this->dtgClassVariable->SetDataBinder('dtgClassVariable_Bind');
     $this->dtgClassVariable->AddColumn($this->colEditLinkColumn);
     $this->dtgClassVariable->AddColumn($this->colId);
     $this->dtgClassVariable->AddColumn($this->colQcodoClassId);
     $this->dtgClassVariable->AddColumn($this->colVariableGroupId);
     $this->dtgClassVariable->AddColumn($this->colProtectionTypeId);
     $this->dtgClassVariable->AddColumn($this->colVariableId);
     $this->dtgClassVariable->AddColumn($this->colReadOnlyFlag);
     $this->dtgClassVariable->AddColumn($this->colStaticFlag);
 }
开发者ID:qcodo,项目名称:qcodo-api,代码行数:35,代码来源:ClassVariableListFormBase.class.php

示例2: __construct

 public function __construct($objParentObject, $strSetEditPanelMethod, $strCloseEditPanelMethod, $strControlId = null)
 {
     // Call the Parent
     try {
         parent::__construct($objParentObject, $strControlId);
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
     // Record Method Callbacks
     $this->strSetEditPanelMethod = $strSetEditPanelMethod;
     $this->strCloseEditPanelMethod = $strCloseEditPanelMethod;
     // Setup DataGrid Columns
     $this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_CONTROL->ParentControl->dtgClassVariable_EditLinkColumn_Render($_ITEM) ?>');
     $this->colEditLinkColumn->HtmlEntities = false;
     $this->colId = new QDataGridColumn(QApplication::Translate('Id'), '<?= $_ITEM->Id; ?>', array('OrderByClause' => QQ::OrderBy(QQN::ClassVariable()->Id), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ClassVariable()->Id, false)));
     $this->colQcodoClassId = new QDataGridColumn(QApplication::Translate('Qcodo Class Id'), '<?= $_CONTROL->ParentControl->dtgClassVariable_QcodoClass_Render($_ITEM); ?>');
     $this->colVariableGroupId = new QDataGridColumn(QApplication::Translate('Variable Group Id'), '<?= $_CONTROL->ParentControl->dtgClassVariable_VariableGroup_Render($_ITEM); ?>');
     $this->colProtectionTypeId = new QDataGridColumn(QApplication::Translate('Protection Type'), '<?= $_CONTROL->ParentControl->dtgClassVariable_ProtectionTypeId_Render($_ITEM); ?>', array('OrderByClause' => QQ::OrderBy(QQN::ClassVariable()->ProtectionTypeId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ClassVariable()->ProtectionTypeId, false)));
     $this->colVariableId = new QDataGridColumn(QApplication::Translate('Variable Id'), '<?= $_CONTROL->ParentControl->dtgClassVariable_Variable_Render($_ITEM); ?>');
     $this->colReadOnlyFlag = new QDataGridColumn(QApplication::Translate('Read Only Flag'), '<?= ($_ITEM->ReadOnlyFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::ClassVariable()->ReadOnlyFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ClassVariable()->ReadOnlyFlag, false)));
     $this->colStaticFlag = new QDataGridColumn(QApplication::Translate('Static Flag'), '<?= ($_ITEM->StaticFlag) ? "true" : "false" ?>', array('OrderByClause' => QQ::OrderBy(QQN::ClassVariable()->StaticFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ClassVariable()->StaticFlag, false)));
     // Setup DataGrid
     $this->dtgClassVariable = new QDataGrid($this);
     $this->dtgClassVariable->CellSpacing = 0;
     $this->dtgClassVariable->CellPadding = 4;
     $this->dtgClassVariable->BorderStyle = QBorderStyle::Solid;
     $this->dtgClassVariable->BorderWidth = 1;
     $this->dtgClassVariable->GridLines = QGridLines::Both;
     // Datagrid Paginator
     $this->dtgClassVariable->Paginator = new QPaginator($this->dtgClassVariable);
     $this->dtgClassVariable->ItemsPerPage = 10;
     // Specify Whether or Not to Refresh using Ajax
     $this->dtgClassVariable->UseAjax = true;
     // Specify the local databind method this datagrid will use
     $this->dtgClassVariable->SetDataBinder('dtgClassVariable_Bind', $this);
     $this->dtgClassVariable->AddColumn($this->colEditLinkColumn);
     $this->dtgClassVariable->AddColumn($this->colId);
     $this->dtgClassVariable->AddColumn($this->colQcodoClassId);
     $this->dtgClassVariable->AddColumn($this->colVariableGroupId);
     $this->dtgClassVariable->AddColumn($this->colProtectionTypeId);
     $this->dtgClassVariable->AddColumn($this->colVariableId);
     $this->dtgClassVariable->AddColumn($this->colReadOnlyFlag);
     $this->dtgClassVariable->AddColumn($this->colStaticFlag);
     // Setup the Create New button
     $this->btnCreateNew = new QButton($this);
     $this->btnCreateNew->Text = QApplication::Translate('Create a New') . ' ' . QApplication::Translate('ClassVariable');
     $this->btnCreateNew->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCreateNew_Click'));
 }
开发者ID:qcodo,项目名称:qcodo-api,代码行数:49,代码来源:ClassVariableListPanelBase.class.php

示例3: __get

 public function __get($strName)
 {
     switch ($strName) {
         /* ONLY TO BE USED when THIS VARIABLE is restored via QcodoClass::GetVariableForVariableGroup() */
         case 'InheritenceState':
             return $this->intInheritenceState;
             /* ONLY TO BE USED when THIS VARIABLE is restored via QcodoClass::GetVariableForVariableGroup() */
         /* ONLY TO BE USED when THIS VARIABLE is restored via QcodoClass::GetVariableForVariableGroup() */
         case 'OverridesVariable':
             return $this->objOverridesVariable;
             /* CAN BE USED ANYWHERE */
         /* CAN BE USED ANYWHERE */
         case 'Overrides':
             $objClass = $this->QcodoClass->ParentQcodoClass;
             while ($objClass) {
                 if ($objVariable = ClassVariable::QuerySingle(QQ::AndCondition(QQ::Equal(QQN::ClassVariable()->QcodoClassId, $objClass->Id), QQ::Equal(QQN::ClassVariable()->Variable->Name, $this->Variable->Name)))) {
                     return $objVariable;
                 }
                 $objClass = $objClass->ParentQcodoClass;
             }
             return null;
         case 'DisplayName':
             switch ($this->intInheritenceState) {
                 case InheritenceState::Interited:
                     return $this->Variable->Name . '&nbsp;<img src="/images/inherited_light.png" border="0" alt="Inherited"/>';
                 case InheritenceState::Overrides:
                     return $this->Variable->Name . '&nbsp;<img src="/images/overrides.png" border="0" alt="Overrides"/>';
                 default:
                     return $this->Variable->Name;
             }
         default:
             try {
                 return parent::__get($strName);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
开发者ID:qcodo,项目名称:qcodo-api,代码行数:39,代码来源:ClassVariable.class.php

示例4: CountByQcodoClassIdVariableGroupId

 /**
  * Count ClassVariables
  * by QcodoClassId, VariableGroupId Index(es)
  * @param integer $intQcodoClassId
  * @param integer $intVariableGroupId
  * @return int
  */
 public static function CountByQcodoClassIdVariableGroupId($intQcodoClassId, $intVariableGroupId)
 {
     // Call ClassVariable::QueryCount to perform the CountByQcodoClassIdVariableGroupId query
     return ClassVariable::QueryCount(QQ::AndCondition(QQ::Equal(QQN::ClassVariable()->QcodoClassId, $intQcodoClassId), QQ::Equal(QQN::ClassVariable()->VariableGroupId, $intVariableGroupId)));
 }
开发者ID:qcodo,项目名称:qcodo-api,代码行数:12,代码来源:ClassVariableGen.class.php

示例5: ProcessFolder


//.........这里部分代码省略.........
                             } else {
                                 $objParentClass = null;
                             }
                             // TO DO
                             // if ($strImplements) {
                             // }
                             $objClass = QcodoClass::RestoreByName($objParserClass->Name, $this->strVersion, $objFile);
                             $objClass->AbstractFlag = $objParserClass->Abstract;
                             $objClass->ParentQcodoClass = $objParentClass;
                             $objClass->Save();
                             // Class Constants
                             $strConstantArray = array();
                             foreach ($objParserClass->ConstantArray as $objParserConstant) {
                                 $objConstant = QcodoConstant::RestoreByNameForClass($objParserConstant->Name, $objClass->Id, $this->strVersion, $objFile);
                                 //										$strValue = QBuildMaker::StripQuotes($objParserConstant->Value);
                                 $strValue = $objParserConstant->Value;
                                 $objConstant->Variable->DefaultValue = $strValue;
                                 $objConstant->Variable->Save();
                                 $strConstantArray[$objParserConstant->Name] = true;
                             }
                             // Class Constants (Deprecate)
                             foreach ($objClass->GetQcodoConstantArray(QQ::Clause(QQ::Expand(QQN::QcodoConstant()->Variable))) as $objConstant) {
                                 if (!array_key_exists($objConstant->Variable->Name, $strConstantArray)) {
                                     $objConstant->Variable->LastVersion = $this->strVersion;
                                     $objConstant->Variable->Save();
                                 }
                             }
                             // Class Variables
                             $strVariableArray = array();
                             foreach ($objParserClass->VariableArray as $objParserVariable) {
                                 $strName = QBuildMaker::StripDollar($objParserVariable->Name);
                                 //										$strValue = QBuildMaker::StripQuotes($objParserVariable->DefaultValue);
                                 $strValue = $objParserVariable->DefaultValue;
                                 $objClassVariable = ClassVariable::RestoreByNameForClass($strName, $objClass->Id, $this->strVersion);
                                 $objClassVariable->Variable->DefaultValue = $strValue;
                                 $objClassVariable->Variable->Save();
                                 $objClassVariable->StaticFlag = $objParserVariable->Static;
                                 switch (strtolower($objParserVariable->Visibility)) {
                                     case 'public':
                                         $objClassVariable->ProtectionTypeId = ProtectionType::_Public;
                                         break;
                                     case 'protected':
                                         $objClassVariable->ProtectionTypeId = ProtectionType::_Protected;
                                         break;
                                     case 'private':
                                         $objClassVariable->ProtectionTypeId = ProtectionType::_Private;
                                         break;
                                     default:
                                         throw new Exception('Unknown Protection Type');
                                 }
                                 $objClassVariable->Save();
                                 $strVariableArray[$strName] = true;
                             }
                             // Class Variables (deprecate)
                             foreach ($objClass->GetClassVariableArray(QQ::Clause(QQ::Expand(QQN::ClassVariable()->Variable))) as $objClassVariable) {
                                 if (!array_key_exists($objClassVariable->Variable->Name, $strVariableArray)) {
                                     $objClassVariable->Variable->LastVersion = $this->strVersion;
                                     $objClassVariable->Variable->Save();
                                 }
                             }
                             // Class Methods
                             $strMethodArray = array();
                             foreach ($objParserClass->MethodArray as $objParserFunction) {
                                 $objOperation = Operation::RestoreByNameForClass($objParserFunction->Name, $objClass->Id, $this->strVersion, $objFile);
                                 $objOperation->StaticFlag = $objParserFunction->Static;
                                 $objOperation->FinalFlag = $objParserFunction->Final;
开发者ID:qcodo,项目名称:qcodo-api,代码行数:67,代码来源:QBuildMaker.class.php

示例6: AggregateVariableArray

 protected function AggregateVariableArray(QcodoClass $objClass, $blnIsRootChild)
 {
     $objVariables = $objClass->GetClassVariableArray(QQ::Clause(QQ::Expand(QQN::ClassVariable()->Variable)));
     foreach ($objVariables as $objVariable) {
         if ($blnIsRootChild) {
             $objVariable->InheritenceState = InheritenceState::RootChild;
             $this->objVariableArray[$objVariable->Variable->Name] = $objVariable;
         } else {
             if (array_key_exists($objVariable->Variable->Name, $this->objVariableArray)) {
                 // The Variable already exists, younger in the array
                 if ($this->objVariableArray[$objVariable->Variable->Name]->InheritenceState == InheritenceState::RootChild) {
                     // This means the Variable in the array overrides
                     $this->objVariableArray[$objVariable->Variable->Name]->InheritenceState = InheritenceState::Overrides;
                     $this->objVariableArray[$objVariable->Variable->Name]->OverridesVariable = $objVariable;
                 }
             } else {
                 // The Variable doesn't yet exist in the array
                 // So therefore, this class inherits the Variable
                 $objVariable->InheritenceState = InheritenceState::Interited;
                 $this->objVariableArray[$objVariable->Variable->Name] = $objVariable;
             }
         }
     }
     if ($objClass->ParentQcodoClassId) {
         $this->AggregateVariableArray($objClass->ParentQcodoClass, false);
     }
 }
开发者ID:qcodo,项目名称:qcodo-api,代码行数:27,代码来源:QcodoClass.class.php


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