Пример #1
0
 public function __get($strName)
 {
     switch ($strName) {
         case 'DisplayName':
             if ($this->blnEnumerationFlag) {
                 return $this->strName . '&nbsp;<img src="/images/enum.png" border="0" alt="Enumeration Class"/>';
             } else {
                 if ($this->blnAbstractFlag) {
                     return $this->strName . '&nbsp;<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;
             }
     }
 }