protected function Form_Create() { if (!QApplication::$Login) { QApplication::Redirect('/'); } $this->objQcodoClass = QcodoClass::Load(QApplication::PathInfo(0)); if (!$this->objQcodoClass) { throw new Exception('Invalid QcodoClass Id: ' . QApplication::PathInfo(0)); } $this->lblName = new QLabel($this); $this->lblName->Text = $this->objQcodoClass->Name; $this->lstClassGroup = new QListBox($this); $this->lstClassGroup->Name = 'Class Group/Classification'; foreach (ClassGroup::LoadAll(QQ::Clause(QQ::OrderBy(QQN::ClassGroup()->OrderNumber))) as $objClassGroup) { $this->lstClassGroup->AddItem($objClassGroup->Name, $objClassGroup->Id, $objClassGroup->Id == $this->objQcodoClass->ClassGroupId); } $this->chkEnumerationFlag = new QCheckBox($this); $this->chkEnumerationFlag->Checked = $this->objQcodoClass->EnumerationFlag; $this->chkEnumerationFlag->Name = 'Enumeration Class Flag'; $this->txtShortDescription = new QTextBox($this); $this->txtShortDescription->Name = QApplication::Translate('Short Description'); $this->txtShortDescription->Text = $this->objQcodoClass->ShortDescription; $this->txtShortDescription->TextMode = QTextMode::MultiLine; $this->txtExtendedDescription = new QWriteBox($this); $this->txtExtendedDescription->Name = QApplication::Translate('Extended Description'); $this->txtExtendedDescription->Text = $this->objQcodoClass->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; }
public function __set($strName, $mixValue) { switch ($strName) { case "Expanded": $this->blnExpanded = $mixValue; if (!$this->blnDataBound) { $this->blnDataBound = true; // Get the class in question $intClassId = $this->strItemId; $objClass = QcodoClass::Load($intClassId); // Bind Children foreach ($objClass->Operations as $objOperation) { new QTreeNavItem($objOperation->DisplayName, $intClassId . 'm' . $objOperation->Id, false, $this->objTreeNav->GetItem($intClassId . 'm'), $intClassId . 'm' . $objOperation->Id); } foreach ($objClass->GetPropertiesForVariableGroupId(null) as $objProperty) { new QTreeNavItem($objProperty->DisplayName, $intClassId . 'p' . $objProperty->Id, false, $this->objTreeNav->GetItem($intClassId . 'p'), $intClassId . 'p' . $objProperty->Id); } foreach ($objClass->GetVariablesForVariableGroupId(null) as $objClassVariable) { new QTreeNavItem($objClassVariable->DisplayName, $intClassId . 'v' . $objClassVariable->Id, false, $this->objTreeNav->GetItem($intClassId . 'v'), $intClassId . 'v' . $objClassVariable->Id); } foreach ($objClass->GetQcodoConstantArray(QQ::Clause(QQ::OrderBy(QQN::QcodoConstant()->Variable->Name))) as $objConstant) { new QTreeNavItem($objConstant->Variable->Name, $intClassId . 'c' . $objConstant->Id, false, $this->objTreeNav->GetItem($intClassId . 'c'), $intClassId . 'c' . $objConstant->Id); } } break; default: try { return parent::__set($strName, $mixValue); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
public function __construct($objParentObject, $objVariableOrParameter, $blnDefaultValueEditable, $blnShowExtendedDescription, $strControlId = null) { // First, call the parent to do most of the basic setup try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } if ($objVariableOrParameter instanceof Parameter) { $this->objParameter = $objVariableOrParameter; $this->objVariable = $this->objParameter->Variable; $blnShowReference = true; } else { $this->objVariable = $objVariableOrParameter; $blnShowReference = false; } // Setup Local Variables $this->strName = $this->objVariable->Name; // Next, we'll create our local subcontrols. Make sure to set "this" as these subcontrols' parent. $this->lstVariableType = new QListBox($this); $this->lstVariableType->Name = $this->strName . ' Variable Type'; $this->lstVariableType->CssClass .= ' vctl'; foreach (VariableType::$NameArray as $intId => $strName) { $this->lstVariableType->AddItem($strName, $intId, $this->objVariable->VariableTypeId == $intId); } $this->lstObjectType = new QListBox($this); $this->lstObjectType->Name = 'Object Type'; $this->lstObjectType->AddItem('- Unspecified -', null); $this->lstObjectType->CssClass .= ' vctl'; foreach (QcodoClass::LoadAll(QQ::Clause(QQ::OrderBy(QQN::QcodoClass()->Name))) as $objQcodoClass) { $this->lstObjectType->AddItem($objQcodoClass->Name, $objQcodoClass->Id, $this->objVariable->ObjectTypeId == $objQcodoClass->Id); } $this->chkArray = new QCheckBox($this); $this->chkArray->Name = $this->strName . ' is an Array?'; $this->chkArray->Checked = $this->objVariable->ArrayFlag; $this->chkReference = new QCheckBox($this); $this->chkReference->Visible = $blnShowReference; if ($this->objParameter) { $this->chkReference->Checked = $this->objParameter->ReferenceFlag; } $this->txtDefaultValue = new QTextBox($this); $this->txtDefaultValue->Name = $this->strName . ' Default Value'; $this->txtDefaultValue->Text = $this->objVariable->DefaultValue; $this->txtDefaultValue->Enabled = $blnDefaultValueEditable; $this->txtDefaultValue->CssClass .= ' vctl'; $this->txtShortDescription = new QTextBox($this); $this->txtShortDescription->Name = $this->strName . ' Short Description'; $this->txtShortDescription->Text = $this->objVariable->ShortDescription; $this->txtShortDescription->TextMode = QTextMode::MultiLine; $this->txtShortDescription->CssClass = 'textbox_multiline'; $this->txtExtendedDescription = new QWriteBox($this); $this->txtExtendedDescription->Name = $this->strName . ' Extended Description'; $this->txtExtendedDescription->Text = $this->objVariable->ExtendedDescription; $this->txtExtendedDescription->CssClass = 'textbox_multiline'; $this->txtExtendedDescription->Visible = $blnShowExtendedDescription; $this->lstVariableType->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'lstVariableType_Change')); $this->lstVariableType_Change(); }
protected function lstParentQcodoClass_Create() { $this->lstParentQcodoClass = new QListBox($this); $this->lstParentQcodoClass->Name = QApplication::Translate('Parent Qcodo Class'); $this->lstParentQcodoClass->AddItem(QApplication::Translate('- Select One -'), null); $objParentQcodoClassArray = QcodoClass::LoadAll(); if ($objParentQcodoClassArray) { foreach ($objParentQcodoClassArray as $objParentQcodoClass) { $objListItem = new QListItem($objParentQcodoClass->__toString(), $objParentQcodoClass->Id); if ($this->objQcodoClass->ParentQcodoClass && $this->objQcodoClass->ParentQcodoClass->Id == $objParentQcodoClass->Id) { $objListItem->Selected = true; } $this->lstParentQcodoClass->AddItem($objListItem); } } }
protected function lstObjectType_Create() { $this->lstObjectType = new QListBox($this); $this->lstObjectType->Name = QApplication::Translate('Object Type'); $this->lstObjectType->AddItem(QApplication::Translate('- Select One -'), null); $objObjectTypeArray = QcodoClass::LoadAll(); if ($objObjectTypeArray) { foreach ($objObjectTypeArray as $objObjectType) { $objListItem = new QListItem($objObjectType->__toString(), $objObjectType->Id); if ($this->objVariable->ObjectType && $this->objVariable->ObjectType->Id == $objObjectType->Id) { $objListItem->Selected = true; } $this->lstObjectType->AddItem($objListItem); } } }
public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects) { if ($objObject->objQcodoClass) { $objObject->objQcodoClass = QcodoClass::GetSoapObjectFromObject($objObject->objQcodoClass, false); } else { if (!$blnBindRelatedObjects) { $objObject->intQcodoClassId = null; } } if ($objObject->objVariableGroup) { $objObject->objVariableGroup = VariableGroup::GetSoapObjectFromObject($objObject->objVariableGroup, false); } else { if (!$blnBindRelatedObjects) { $objObject->intVariableGroupId = null; } } if ($objObject->objVariable) { $objObject->objVariable = Variable::GetSoapObjectFromObject($objObject->objVariable, false); } else { if (!$blnBindRelatedObjects) { $objObject->intVariableId = null; } } return $objObject; }
/** * Counts all associated QcodoClasses * @return int */ public function CountQcodoClasses() { if (is_null($this->intId)) { return 0; } return QcodoClass::CountByClassGroupId($this->intId); }
protected function dtgQcodoClass_Bind() { // Get Total Count b/c of Pagination $this->dtgQcodoClass->TotalItemCount = QcodoClass::CountAll(); $objClauses = array(); if ($objClause = $this->dtgQcodoClass->OrderByClause) { array_push($objClauses, $objClause); } if ($objClause = $this->dtgQcodoClass->LimitClause) { array_push($objClauses, $objClause); } $this->dtgQcodoClass->DataSource = QcodoClass::LoadAll($objClauses); }
protected function lstQcodoClass_Create() { $this->lstQcodoClass = new QListBox($this); $this->lstQcodoClass->Name = QApplication::Translate('Qcodo Class'); $this->lstQcodoClass->Required = true; if (!$this->blnEditMode) { $this->lstQcodoClass->AddItem(QApplication::Translate('- Select One -'), null); } $objQcodoClassArray = QcodoClass::LoadAll(); if ($objQcodoClassArray) { foreach ($objQcodoClassArray as $objQcodoClass) { $objListItem = new QListItem($objQcodoClass->__toString(), $objQcodoClass->Id); if ($this->objClassProperty->QcodoClass && $this->objClassProperty->QcodoClass->Id == $objQcodoClass->Id) { $objListItem->Selected = true; } $this->lstQcodoClass->AddItem($objListItem); } } }
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); } } } } } }
public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects) { if ($objObject->objObjectType) { $objObject->objObjectType = QcodoClass::GetSoapObjectFromObject($objObject->objObjectType, false); } else { if (!$blnBindRelatedObjects) { $objObject->intObjectTypeId = null; } } return $objObject; }
public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects) { if ($objObject->objQcodoClass) { $objObject->objQcodoClass = QcodoClass::GetSoapObjectFromObject($objObject->objQcodoClass, false); } else { if (!$blnBindRelatedObjects) { $objObject->intQcodoClassId = null; } } if ($objObject->objQcodoInterface) { $objObject->objQcodoInterface = QcodoInterface::GetSoapObjectFromObject($objObject->objQcodoInterface, false); } else { if (!$blnBindRelatedObjects) { $objObject->intQcodoInterfaceId = null; } } if ($objObject->objReturnVariable) { $objObject->objReturnVariable = Variable::GetSoapObjectFromObject($objObject->objReturnVariable, false); } else { if (!$blnBindRelatedObjects) { $objObject->intReturnVariableId = null; } } if ($objObject->objAdditionalVariable) { $objObject->objAdditionalVariable = Variable::GetSoapObjectFromObject($objObject->objAdditionalVariable, false); } else { if (!$blnBindRelatedObjects) { $objObject->intAdditionalVariableId = null; } } if ($objObject->objFile) { $objObject->objFile = File::GetSoapObjectFromObject($objObject->objFile, false); } else { if (!$blnBindRelatedObjects) { $objObject->intFileId = null; } } return $objObject; }
protected function ProcessFolder($strFolder) { $strLabel = substr($strFolder, strlen($this->strRoot) + 1); if (!$strLabel) { $strLabel = 'root'; } print 'Processing ' . $strLabel . ' ['; $strFileArray = array(); $strFolderArray = array(); // Iterate through all subfolders and files in this folder // Be sure not to process anything with CVS, SVN or ds_store $objDirectory = opendir($strFolder); while ($strName = readdir($objDirectory)) { if ($strName != '.' && $strName != '..' && $strName != 'SVN' && $strName != '.svnignore' && $strName != 'CVS' && $strName != '.cvsignore' && strtolower($strName) != '.ds_store') { $strFullPath = $strFolder . '/' . $strName; if (is_dir($strFullPath)) { array_push($strFolderArray, $strFullPath); } else { array_push($strFileArray, $strFullPath); } } } $intFileCount = count($strFileArray); for ($intFileIndex = 0; $intFileIndex < $intFileCount; $intFileIndex++) { print ' '; } print ']'; for ($intFileIndex = 0; $intFileIndex <= $intFileCount; $intFileIndex++) { print chr(8); } foreach ($strFileArray as $strFile) { print 'X'; $strMd5 = md5_file($strFile); $strFullPath = $strFile; $strFile = substr($strFile, strlen($this->strRoot) + 1); // Process all files other than the root _README.txt and LICENSE.txt if ($strFile != '_README.txt' && $strFile != '_LICENSE.txt') { $intDirectoryId = null; $objFileDirectory = null; foreach ($this->objDirectoryTokens as $objDirectory) { if (!$intDirectoryId) { if (strpos($strFile, $objDirectory->Path) === 0) { $intDirectoryId = $objDirectory->Id; $objFileDirectory = $objDirectory; $strFile = substr($strFile, strlen($objDirectory->Path)); } } } if (!$intDirectoryId) { var_dump($this->objDirectoryTokens); exit("FATAL ERROR: No DirectoryToken resolution for " . $strFile . "\r\n"); } $objFile = File::LoadByDirectoryIdPath($intDirectoryId, $strFile); if (!$objFile) { $objFile = new File(); $objFile->Path = $strFile; $objFile->DirectoryId = $intDirectoryId; } else { $objFile->DeprecatedMajorVersion = null; $objFile->DeprecatedMinorVersion = null; $objFile->DeprecatedBuild = null; } $objFile->Save(); $this->blnFileProcessedArray['id' . $objFile->Id] = true; $this->strXml .= sprintf("<file directoryToken=\"%s\" path=\"%s\" md5=\"%s\"/>\r\n", $objFileDirectory->Token, $strFile, $strMd5); // Parse tokens for documetation for all PHP files outside of assets and PHPUnit if (substr($strFile, strlen($strFile) - 4) == '.php' && strpos($strFullPath, '/assets/') === false && strpos($strFullPath, '/PHPUnit/') === false) { switch ($objFileDirectory->Token) { case '__INCLUDES__': case '__QCODO__': case '__QCODO_CORE__': $objParser = new QScriptParser($strFullPath); $objResult = $objParser->ParseTokens(); // Iterate through the Class Definitions foreach ($objResult->ClassArray as $objParserClass) { if ($objParserClass->Extends) { $objParentClass = QcodoClass::RestoreByName($objParserClass->Extends, $this->strVersion, null); } 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; $objOperation->AbstractFlag = $objParserFunction->Abstract; switch (strtolower($objParserFunction->Visibility)) { case 'public': $objOperation->ProtectionTypeId = ProtectionType::_Public; break; case 'protected': $objOperation->ProtectionTypeId = ProtectionType::_Protected; break; case 'private': $objOperation->ProtectionTypeId = ProtectionType::_Private; break; default: throw new Exception('Unknown Protection Type'); } $objOperation->Save(); $strMethodArray[$objParserFunction->Name] = true; // Figure Out the Parameters $objParserParameterArray = array(); foreach ($objParserFunction->ParameterArray as $objParserParameter) { $strName = QBuildMaker::StripDollar($objParserParameter->Name); $objParserParameterArray[$strName] = $objParserParameter; } $objParameterArray = Parameter::RestoreParameterArrayByNameForOperation(array_keys($objParserParameterArray), $objOperation->Id, $this->strVersion); foreach ($objParameterArray as $objParameter) { $objParserParameter = $objParserParameterArray[$objParameter->Variable->Name]; $objParameter->ReferenceFlag = $objParserParameter->Reference; $objParameter->Save(); $objParameter->Variable->DefaultValue = $objParserParameter->DefaultValue; $objParameter->Variable->Save(); } } // Class Methods (deprecate) foreach ($objClass->GetOperationArray() as $objOperation) { if (!array_key_exists($objOperation->Name, $strMethodArray)) { $objOperation->LastVersion = $this->strVersion; $objOperation->Save(); } } // Class Properties $strPropertyArray = array(); foreach ($objParserClass->PropertyArray as $objParserProperty) { $strName = QBuildMaker::StripQuotes($objParserProperty->Name); if ($strName != 'ttf' && $strName != 'pfb' && $strName != 'afm') { $objProperty = ClassProperty::RestoreByNameForClass($strName, $objClass->Id, $this->strVersion); if ($objParserProperty->Read && !$objParserProperty->Write) { $objProperty->ReadOnlyFlag = true; $objProperty->WriteOnlyFlag = false; } else { if (!$objParserProperty->Read && $objParserProperty->Write) { $objProperty->ReadOnlyFlag = false; $objProperty->WriteOnlyFlag = true; } else { $objProperty->ReadOnlyFlag = false; $objProperty->WriteOnlyFlag = false; } } $objProperty->Save(); $strPropertyArray[$strName] = true; } } // Class Properties (deprecate) foreach ($objClass->GetClassPropertyArray() as $objProperty) { if (!array_key_exists($objProperty->Variable->Name, $strPropertyArray)) { $objProperty->Variable->LastVersion = $this->strVersion; $objProperty->Save(); } } } // Iterate through the Interfaces // TODO // Iterate through the Global Functions foreach ($objResult->FunctionArray as $objParserFunction) { $objOperation = Operation::RestoreByNameForClass($objParserFunction->Name, null, $this->strVersion, $objFile); // Figure Out the Parameters $objParserParameterArray = array(); foreach ($objParserFunction->ParameterArray as $objParserParameter) { $strName = QBuildMaker::StripDollar($objParserParameter->Name); $objParserParameterArray[$strName] = $objParserParameter; } $objParameterArray = Parameter::RestoreParameterArrayByNameForOperation(array_keys($objParserParameterArray), $objOperation->Id, $this->strVersion); foreach ($objParameterArray as $objParameter) { $objParserParameter = $objParserParameterArray[$objParameter->Variable->Name]; $objParameter->ReferenceFlag = $objParserParameter->Reference; $objParameter->Save(); $objParameter->Variable->DefaultValue = $objParserParameter->DefaultValue; $objParameter->Variable->Save(); } } // Iterate through the Global Constants foreach ($objResult->ConstantArray as $objParserConstant) { $objConstant = QcodoConstant::RestoreByNameForClass($objParserConstant->Name, null, $this->strVersion, $objFile); // $strValue = QBuildMaker::StripQuotes($objParserConstant->Value); $strValue = $objParserConstant->Value; $objConstant->Variable->DefaultValue = $strValue; $objConstant->Variable->Save(); } // Iterate through the Global Variables // NOT SUPPORTED break; } } } } print "] Done.\r\n"; foreach ($strFolderArray as $strFolder) { $this->ProcessFolder($strFolder); } }
/** * Counts all associated QcodoClassesAsInterface * @return int */ public function CountQcodoClassesAsInterface() { if (is_null($this->intId)) { return 0; } return QcodoClass::CountByInterfaceId($this->intId); }
public function __get($strName) { switch ($strName) { case 'DisplayName': if ($this->blnEnumerationFlag) { return $this->strName . ' <img src="/images/enum.png" border="0" alt="Enumeration Class"/>'; } else { if ($this->blnAbstractFlag) { return $this->strName . ' <img src="/images/abstract.png" border="0" alt="Abstract Class"/>'; } } // return '[' . $this->strName . ']'; return $this->strName; case 'Operations': $objToReturn = array(); QcodoClass::GetOperationsHelper($objToReturn, $this, true); // Sort It ksort($objToReturn); // Pull Magic Operations "__" up top $objMagicOperations = array(); foreach (array_keys($objToReturn) as $strKey) { if (substr($strKey, 0, 2) == '__') { $objMagicOperations[$strKey] = $objToReturn[$strKey]; unset($objToReturn[$strKey]); } } // Return the Final Result return array_merge($objMagicOperations, $objToReturn); case 'ShortDescriptionAsHtml': $strToReturn = QApplication::HtmlEntities(trim($this->strShortDescription)); $strToReturn = str_replace("\r", '', $strToReturn); $strToReturn = str_replace("\n", '<br/>', $strToReturn); return $strToReturn; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects) { if ($objObject->objParentQcodoClass) { $objObject->objParentQcodoClass = QcodoClass::GetSoapObjectFromObject($objObject->objParentQcodoClass, false); } else { if (!$blnBindRelatedObjects) { $objObject->intParentQcodoClassId = null; } } if ($objObject->objInterface) { $objObject->objInterface = QcodoInterface::GetSoapObjectFromObject($objObject->objInterface, false); } else { if (!$blnBindRelatedObjects) { $objObject->intInterfaceId = null; } } if ($objObject->objClassGroup) { $objObject->objClassGroup = ClassGroup::GetSoapObjectFromObject($objObject->objClassGroup, false); } else { if (!$blnBindRelatedObjects) { $objObject->intClassGroupId = null; } } if ($objObject->objFile) { $objObject->objFile = File::GetSoapObjectFromObject($objObject->objFile, false); } else { if (!$blnBindRelatedObjects) { $objObject->intFileId = null; } } return $objObject; }