コード例 #1
0
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case 'CodeCssClass':
             try {
                 return $this->strCodeCssClass = QType::Cast($mixValue, QType::String);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 return $objExc;
             }
         default:
             try {
                 return parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 return $objExc;
             }
     }
 }
コード例 #2
0
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         // MISC
         case "UniqueList":
             try {
                 $this->strUniqueList = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
コード例 #3
0
ファイル: TextBox.php プロジェクト: alfhan/plugin_bootstrap
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case "SizingClass":
             // Bootstrap::InputGroupLarge, Bootstrap::InputGroupMedium or Bootstrap::InputGroupSmall
             try {
                 $this->SetSizingClass($mixValue);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "LeftText":
             try {
                 $this->SetLeftText($mixValue);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "RightText":
             try {
                 $this->SetRightText($mixValue);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
コード例 #4
0
ファイル: QUrlTextBox.class.php プロジェクト: klucznik/qcodo
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // MISC
         case 'LabelForInvalid':
             try {
                 $this->strLabelForInvalid = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
コード例 #5
0
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case 'AltField':
             $this->mixAltField = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'altField', $mixValue);
             }
             break;
         case 'AltFormat':
             try {
                 $this->strAltFormat = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'altFormat', $this->strAltFormat);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'AppendText':
             try {
                 $this->strAppendText = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'appendText', $this->strAppendText);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'AutoSize':
             try {
                 $this->blnAutoSize = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'autoSize', $this->blnAutoSize);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'OnBeforeShow':
             try {
                 $this->mixOnBeforeShow = new QJsClosure($mixValue, array("input", "inst"));
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'OnBeforeShowDay':
             try {
                 $this->mixOnBeforeShowDay = new QJsClosure($mixValue, array("date"));
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ButtonImage':
             try {
                 $this->strButtonImage = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'buttonImage', $this->strButtonImage);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ButtonImageOnly':
             try {
                 $this->blnButtonImageOnly = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'buttonImageOnly', $this->blnButtonImageOnly);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ButtonText':
             try {
                 $this->strButtonText = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'buttonText', $this->strButtonText);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'OnCalculateWeek':
             try {
                 $this->mixOnCalculateWeek = new QJsClosure($mixValue, array(""));
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ChangeMonth':
             try {
                 $this->blnChangeMonth = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'changeMonth', $this->blnChangeMonth);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ChangeYear':
             try {
                 $this->blnChangeYear = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'changeYear', $this->blnChangeYear);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'CloseText':
             try {
                 $this->strCloseText = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'closeText', $this->strCloseText);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ConstrainInput':
             try {
                 $this->blnConstrainInput = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'constrainInput', $this->blnConstrainInput);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'CurrentText':
             try {
                 $this->strCurrentText = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'currentText', $this->strCurrentText);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'JqDateFormat':
             try {
                 $this->strJqDateFormat = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'dateFormat', $this->strJqDateFormat);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'DayNames':
             try {
                 $this->arrDayNames = QType::Cast($mixValue, QType::ArrayType);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'dayNames', $this->arrDayNames);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'DayNamesMin':
             try {
                 $this->arrDayNamesMin = QType::Cast($mixValue, QType::ArrayType);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'dayNamesMin', $this->arrDayNamesMin);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'DayNamesShort':
             try {
                 $this->arrDayNamesShort = QType::Cast($mixValue, QType::ArrayType);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'dayNamesShort', $this->arrDayNamesShort);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'DefaultDate':
             $this->mixDefaultDate = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'defaultDate', $mixValue);
             }
             break;
         case 'Duration':
             $this->mixDuration = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'duration', $mixValue);
             }
             break;
         case 'FirstDay':
             try {
                 $this->intFirstDay = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'firstDay', $this->intFirstDay);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'GotoCurrent':
             try {
                 $this->blnGotoCurrent = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'gotoCurrent', $this->blnGotoCurrent);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'HideIfNoPrevNext':
             try {
                 $this->blnHideIfNoPrevNext = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'hideIfNoPrevNext', $this->blnHideIfNoPrevNext);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'IsRTL':
             try {
                 $this->blnIsRTL = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'isRTL', $this->blnIsRTL);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'MaxDate':
             $this->mixMaxDate = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'maxDate', $mixValue);
             }
             break;
         case 'MinDate':
             $this->mixMinDate = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'minDate', $mixValue);
             }
             break;
         case 'MonthNames':
             try {
                 $this->arrMonthNames = QType::Cast($mixValue, QType::ArrayType);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'monthNames', $this->arrMonthNames);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'MonthNamesShort':
             try {
                 $this->arrMonthNamesShort = QType::Cast($mixValue, QType::ArrayType);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'monthNamesShort', $this->arrMonthNamesShort);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'NavigationAsDateFormat':
             try {
                 $this->blnNavigationAsDateFormat = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'navigationAsDateFormat', $this->blnNavigationAsDateFormat);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'NextText':
             try {
                 $this->strNextText = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'nextText', $this->strNextText);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'NumberOfMonths':
             $this->mixNumberOfMonths = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'numberOfMonths', $mixValue);
             }
             break;
         case 'OnChangeMonthYear':
             try {
                 $this->mixOnChangeMonthYear = new QJsClosure($mixValue, array("year", "month", "inst"));
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'OnClose':
             try {
                 $this->mixOnClose = new QJsClosure($mixValue, array("dateText", "inst"));
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'OnSelect':
             try {
                 $this->mixOnSelect = new QJsClosure($mixValue, array("dateText", "inst"));
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'PrevText':
             try {
                 $this->strPrevText = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'prevText', $this->strPrevText);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'SelectOtherMonths':
             try {
                 $this->blnSelectOtherMonths = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'selectOtherMonths', $this->blnSelectOtherMonths);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ShortYearCutoff':
             $this->mixShortYearCutoff = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'shortYearCutoff', $mixValue);
             }
             break;
         case 'ShowAnim':
             try {
                 $this->strShowAnim = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'showAnim', $this->strShowAnim);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ShowButtonPanel':
             try {
                 $this->blnShowButtonPanel = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'showButtonPanel', $this->blnShowButtonPanel);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ShowCurrentAtPos':
             try {
                 $this->intShowCurrentAtPos = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'showCurrentAtPos', $this->intShowCurrentAtPos);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ShowMonthAfterYear':
             try {
                 $this->blnShowMonthAfterYear = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'showMonthAfterYear', $this->blnShowMonthAfterYear);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ShowOn':
             try {
                 $this->strShowOn = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'showOn', $this->strShowOn);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ShowOptions':
             $this->mixShowOptions = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'showOptions', $mixValue);
             }
             break;
         case 'ShowOtherMonths':
             try {
                 $this->blnShowOtherMonths = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'showOtherMonths', $this->blnShowOtherMonths);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ShowWeek':
             try {
                 $this->blnShowWeek = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'showWeek', $this->blnShowWeek);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'StepMonths':
             try {
                 $this->intStepMonths = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'stepMonths', $this->intStepMonths);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'WeekHeader':
             try {
                 $this->strWeekHeader = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'weekHeader', $this->strWeekHeader);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'YearRange':
             try {
                 $this->strYearRange = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'yearRange', $this->strYearRange);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'YearSuffix':
             try {
                 $this->strYearSuffix = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'yearSuffix', $this->strYearSuffix);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
                 break;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
コード例 #6
0
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // MISC
         case 'Maximum':
             try {
                 if ($mixValue == QDateTime::Now) {
                     $this->dttMaximum = QDateTime::Now;
                 } else {
                     $this->dttMaximum = QType::Cast($mixValue, QType::DateTime);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Minimum':
             try {
                 if ($mixValue == QDateTime::Now) {
                     $this->dttMinimum = QDateTime::Now;
                 } else {
                     $this->dttMinimum = QType::Cast($mixValue, QType::DateTime);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'LabelForInvalid':
             try {
                 return $this->strLabelForInvalid = QType::Cast($mixValue, QType::String);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
コード例 #7
0
 /**
  * PHP __set magic method implementation
  * @param string $strName Property Name
  * @param string $mixValue Property value
  *
  * @throws Exception|QCallerException
  * @throws Exception|QInvalidCastException
  */
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // MISC
         case "Maximum":
             try {
                 $this->mixMaximum = QType::Cast($mixValue, $this->strDataType);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Minimum":
             try {
                 $this->mixMinimum = QType::Cast($mixValue, $this->strDataType);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Step":
             try {
                 $this->mixStep = QType::Cast($mixValue, $this->strDataType);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'LabelForInvalid':
             try {
                 $this->strLabelForInvalid = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'LabelForGreater':
             try {
                 $this->strLabelForGreater = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'LabelForLess':
             try {
                 $this->strLabelForLess = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'LabelForNotStepAligned':
             try {
                 $this->strLabelForNotStepAligned = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
コード例 #8
0
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case 'AppendTo':
             $this->mixAppendTo = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'appendTo', $mixValue);
             }
             break;
         case 'AutoFocus':
             try {
                 $this->blnAutoFocus = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'autoFocus', $this->blnAutoFocus);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Delay':
             try {
                 $this->intDelay = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'delay', $this->intDelay);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Disabled':
             try {
                 $this->blnDisabled = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'disabled', $this->blnDisabled);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'MinLength':
             try {
                 $this->intMinLength = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'minLength', $this->intMinLength);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Position':
             $this->mixPosition = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'position', $mixValue);
             }
             break;
         case 'Source':
             $this->mixSource = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'source', $mixValue);
             }
             break;
         case 'Enabled':
             $this->Disabled = !$mixValue;
             // Tie in standard QCubed functionality
             parent::__set($strName, $mixValue);
             break;
         default:
             try {
                 parent::__set($strName, $mixValue);
                 break;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
コード例 #9
0
 /**
  * PHP __set magic method implementation
  *
  * @param string $strName  Name of the property
  * @param string $mixValue Value of the property
  *
  * @return mixed|void
  * @throws Exception|QCallerException|QInvalidCastException
  */
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // APPEARANCE
         case "Delimiter":
             try {
                 $this->strDelimiter = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Enclosure":
             try {
                 $this->strEnclosure = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Escape":
             try {
                 $this->strEscape = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "MinItemCount":
             try {
                 $this->intMinItemCount = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "MaxItemCount":
             try {
                 $this->intMaxItemCount = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Value":
             try {
                 $a = QType::Cast($mixValue, QType::ArrayType);
                 $temp_memory = fopen('php://memory', 'w');
                 fputcsv($temp_memory, $a, $this->strDelimiter, $this->strEnclosure);
                 rewind($temp_memory);
                 $this->strText = fgets($temp_memory);
                 fclose($temp_memory);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
コード例 #10
0
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case 'Culture':
             try {
                 $this->strCulture = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'culture', $this->strCulture);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Disabled':
             try {
                 $this->blnDisabled = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'disabled', $this->blnDisabled);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Icons':
             $this->mixIcons = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'icons', $mixValue);
             }
             break;
         case 'Incremental':
             $this->mixIncremental = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'incremental', $mixValue);
             }
             break;
         case 'Max':
             $this->mixMax = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'max', $mixValue);
             }
             break;
         case 'Min':
             $this->mixMin = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'min', $mixValue);
             }
             break;
         case 'NumberFormat':
             try {
                 $this->strNumberFormat = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'numberFormat', $this->strNumberFormat);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Page':
             try {
                 $this->intPage = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'page', $this->intPage);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Step':
             $this->mixStep = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'step', $mixValue);
             }
             break;
         case 'Enabled':
             $this->Disabled = !$mixValue;
             // Tie in standard QCubed functionality
             parent::__set($strName, $mixValue);
             break;
         default:
             try {
                 parent::__set($strName, $mixValue);
                 break;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
コード例 #11
0
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // MISC
         case 'Maximum':
             try {
                 if ($mixValue == QDateTime::Now) {
                     $this->dttMaximum = QDateTime::Now;
                 } else {
                     $this->dttMaximum = QType::Cast($mixValue, QType::DateTime);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Minimum':
             try {
                 if ($mixValue == QDateTime::Now) {
                     $this->dttMinimum = QDateTime::Now;
                 } else {
                     $this->dttMinimum = QType::Cast($mixValue, QType::DateTime);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'DateTimeFormat':
             try {
                 $this->strDateTimeFormat = QType::Cast($mixValue, QType::String);
                 // trigger an update to reformat the text with the new format
                 $this->DateTime = $this->dttDateTime;
                 return $this->strDateTimeFormat;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'DateTime':
             try {
                 $this->dttDateTime = QType::Cast($mixValue, QType::DateTime);
                 if (!$this->dttDateTime || !$this->strDateTimeFormat) {
                     parent::__set('Text', '');
                 } else {
                     parent::__set('Text', $this->dttDateTime->qFormat($this->strDateTimeFormat));
                 }
                 return $this->dttDateTime;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Text':
             $this->dttDateTime = QDateTimeTextBox::ParseForDateTimeValue($this->strText);
             return parent::__set('Text', $mixValue);
         case 'LabelForInvalid':
             try {
                 return $this->strLabelForInvalid = QType::Cast($mixValue, QType::String);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
コード例 #12
0
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case "DefaultAreaCode":
             try {
                 return $this->strDefaultAreaCode = QType::Cast($mixValue, QType::String);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Text":
         case "Value":
             parent::__set($strName, $mixValue);
             // Reformat after a change. Can't detect this kind of change just in JavaScript.
             QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), 'checkChanged', QJsPriority::Low);
             break;
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }