public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // APPEARANCE
         case "Text":
             try {
                 $this->strText = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ForControlId":
             try {
                 $this->strForControlId = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ForControl":
             try {
                 $objControl = QType::Cast($mixValue, 'QControl');
                 $this->strForControlId = QType::Cast($objControl->ControlId, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
Example #2
0
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // MISC
         case "DateTime":
             try {
                 $dttDate = QType::Cast($mixValue, QType::DateTime);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             $this->intSelectedMonth = null;
             $this->intSelectedDay = null;
             $this->intSelectedYear = null;
             if (is_null($dttDate) || $dttDate->IsNull()) {
                 $this->dttDateTime = null;
             } else {
                 $this->dttDateTime = $dttDate;
             }
             break;
         case "DateTimePickerType":
             try {
                 $this->strDateTimePickerType = QType::Cast($mixValue, QType::String);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
         case "DateTimePickerFormat":
             try {
                 $this->strDateTimePickerFormat = QType::Cast($mixValue, QType::String);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
         case "MinimumYear":
             try {
                 $this->intMinimumYear = QType::Cast($mixValue, QType::String);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
         case "MaximumYear":
             try {
                 $this->intMaximumYear = QType::Cast($mixValue, QType::String);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
         default:
             try {
                 parent::__set($strName, $mixValue);
                 break;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
Example #3
0
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case "ItemCssStyle":
             try {
                 $this->strItemCssStyle = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ItemSelectedCssStyle":
             try {
                 $this->strItemSelectedCssStyle = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ItemHoverCssStyle":
             try {
                 $this->strItemHoverCssStyle = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "IndentWidth":
             try {
                 $this->intIndentWidth = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ItemHeight":
             try {
                 $this->intItemHeight = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ItemWidth":
             try {
                 $this->intItemWidth = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ExpandOnSelect":
             try {
                 $this->blnExpandOnSelect = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "SelectedItem":
             try {
                 $objItem = QType::Cast($mixValue, "QTreeNavItem");
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // If the currently selected item is $objItem, then do nothing
             if ($objItem && $this->objSelectedTreeNavItem && (string) $this->objSelectedTreeNavItem->ItemId == (string) $objItem->ItemId) {
                 return $objItem;
             }
             // Deselect the Old (if applicable)
             if ($this->objSelectedTreeNavItem) {
                 // if we are in an AJAX response scenario, we MUST remember to use a javascript update call
                 // to "deselect" the old selected item
                 QApplication::ExecuteJavaScript(sprintf("treenavItemUnselect('%s_%s_label', '%s')", $this->strControlId, $this->objSelectedTreeNavItem->ItemId, $this->strItemCssStyle));
                 // Update deselection in the form state, too
                 $this->objSelectedTreeNavItem->Selected = false;
             }
             if ($this->objSelectedTreeNavItem = $objItem) {
                 $objItem->Selected = true;
                 if ($this->blnExpandOnSelect) {
                     $objItem->Expanded = true;
                 }
                 // Ensure that all parents and ancestors are expanded
                 $objParent = $this->GetItem($objItem->ParentItemId);
                 while ($objParent) {
                     $objParent->Expanded = true;
                     $objParent = $this->GetItem($objParent->ParentItemId);
                 }
             }
             return $objItem;
         case "ItemExpanded":
             $strTokenArray = explode(' ', $mixValue);
             $objItem = $this->GetItem($strTokenArray[0]);
             $objItem->Expanded = $strTokenArray[1];
             return $strTokenArray[1];
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
Example #4
0
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
		public function __set($strName, $mixValue) {
			$this->blnModified = true;

			switch ($strName) {
				// APPEARANCE
				case "Columns":
					try {
						$this->intColumns = QType::Cast($mixValue, QType::Integer);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
				case "Format":
					try {
						$this->strFormat = QType::Cast($mixValue, QType::String);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
				case "Text":
					try {
						$this->strText = QType::Cast($mixValue, QType::String);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
				case "LabelForRequired":
					try {
						$this->strLabelForRequired = QType::Cast($mixValue, QType::String);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
				case "LabelForRequiredUnnamed":
					try {
						$this->strLabelForRequiredUnnamed = QType::Cast($mixValue, QType::String);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
				case "LabelForTooShort":
					try {
						$this->strLabelForTooShort = QType::Cast($mixValue, QType::String);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
				case "LabelForTooShortUnnamed":
					try {
						$this->strLabelForTooShortUnnamed = QType::Cast($mixValue, QType::String);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
				case "LabelForTooLong":
					try {
						$this->strLabelForTooLong = QType::Cast($mixValue, QType::String);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
				case "LabelForTooLongUnnamed":
					try {
						$this->strLabelForTooLongUnnamed = QType::Cast($mixValue, QType::String);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				// BEHAVIOR
				case "CrossScripting":
					try {
						$this->strCrossScripting = QType::Cast($mixValue, QType::Boolean);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
				case "MaxLength":
					try {
						$this->intMaxLength = QType::Cast($mixValue, QType::Integer);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
				case "MinLength":
					try {
						$this->intMinLength = QType::Cast($mixValue, QType::Integer);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
				case "ReadOnly":
					try {
						$this->blnReadOnly = QType::Cast($mixValue, QType::Boolean);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
				case "Rows":
					try {
						$this->intRows = QType::Cast($mixValue, QType::Integer);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
				case "TextMode":
					try {
						$this->strTextMode = QType::Cast($mixValue, QType::String);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
				case "ValidateTrimmed":
					try {
						$this->blnValidateTrimmed = QType::Cast($mixValue, QType::Boolean);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				// LAYOUT
				case "Wrap":
					try {
						$this->blnWrap = QType::Cast($mixValue, QType::Boolean);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				default:
					try {
						parent::__set($strName, $mixValue);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
					break;
			}
		}
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // APPEARANCE
         case "ScaleCanvasDown":
             try {
                 $this->blnScaleCanvasDown = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ScaleImageUp":
             try {
                 $this->blnScaleImageUp = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // BEHAVIOR
         // BEHAVIOR
         case "ImageType":
             try {
                 $this->strImageType = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Quality":
             try {
                 $this->intQuality = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "CacheFolder":
             try {
                 $this->strCacheFolder = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "CacheFilename":
             try {
                 $this->strCacheFilename = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ImagePath":
             try {
                 $this->strImagePath = QType::Cast($mixValue, QType::String);
                 if (!$this->strImagePath || !is_file($this->strImagePath)) {
                     throw new QCallerException('ImagePath is not defined or does not exist');
                 }
                 $this->strImagePath = realpath($this->strImagePath);
                 $strSourceImageType = trim(strtolower(substr($this->strImagePath, strrpos($this->strImagePath, '.') + 1)));
                 switch ($strSourceImageType) {
                     case 'jpeg':
                     case 'jpg':
                         $this->strSourceImageType = QImageType::Jpeg;
                         break;
                     case 'png':
                         $this->strSourceImageType = QImageType::Png;
                         break;
                     case 'gif':
                         $this->strSourceImageType = QImageType::Gif;
                         break;
                     default:
                         throw new QCallerException('Image Type cannot be determined: ' . $mixValue);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "AlternateText":
             try {
                 $this->strAlternateText = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // OVERRIDDEN SETTERS
         // OVERRIDDEN SETTERS
         case "BackColor":
             try {
                 $mixValue = strtolower(QType::Cast($mixValue, QType::String));
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             if (strlen($mixValue) != 6) {
                 throw new QInvalidCastException('BackColor must be a 6-digit hexadecimal value');
             }
             // Verify ControlId is only Hexadecimal Digits
             $strMatches = array();
             $strPattern = '/[a-f0-9]*/';
             preg_match($strPattern, $mixValue, $strMatches);
             if (count($strMatches) && $strMatches[0] == $mixValue) {
                 return $this->strBackColor = $mixValue;
             } else {
                 throw new QInvalidCastException('BackColor must be a 6-digit hexadecimal value');
             }
             break;
         case "Width":
             try {
                 $this->strWidth = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Height":
             try {
                 $this->strHeight = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case 'AddClasses':
             try {
                 $this->blnAddClasses = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'addClasses', $this->blnAddClasses);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'AppendTo':
             $this->mixAppendTo = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'appendTo', $mixValue);
             }
             break;
         case 'Axis':
             try {
                 $this->strAxis = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'axis', $this->strAxis);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Cancel':
             $this->mixCancel = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'cancel', $mixValue);
             }
             break;
         case 'ConnectToSortable':
             $this->mixConnectToSortable = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'connectToSortable', $mixValue);
             }
             break;
         case 'Containment':
             $this->mixContainment = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'containment', $mixValue);
             }
             break;
         case 'Cursor':
             try {
                 $this->strCursor = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'cursor', $this->strCursor);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'CursorAt':
             $this->mixCursorAt = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'cursorAt', $mixValue);
             }
             break;
         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 'Distance':
             try {
                 $this->intDistance = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'distance', $this->intDistance);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Grid':
             try {
                 $this->arrGrid = QType::Cast($mixValue, QType::ArrayType);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'grid', $this->arrGrid);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Handle':
             $this->mixHandle = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'handle', $mixValue);
             }
             break;
         case 'Helper':
             $this->mixHelper = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'helper', $mixValue);
             }
             break;
         case 'IframeFix':
             $this->mixIframeFix = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'iframeFix', $mixValue);
             }
             break;
         case 'Opacity':
             try {
                 $this->intOpacity = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'opacity', $this->intOpacity);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'RefreshPositions':
             try {
                 $this->blnRefreshPositions = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'refreshPositions', $this->blnRefreshPositions);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Revert':
             $this->mixRevert = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'revert', $mixValue);
             }
             break;
         case 'RevertDuration':
             try {
                 $this->intRevertDuration = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'revertDuration', $this->intRevertDuration);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Scope':
             try {
                 $this->strScope = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'scope', $this->strScope);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Scroll':
             try {
                 $this->blnScroll = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'scroll', $this->blnScroll);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ScrollSensitivity':
             try {
                 $this->intScrollSensitivity = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'scrollSensitivity', $this->intScrollSensitivity);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ScrollSpeed':
             try {
                 $this->intScrollSpeed = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'scrollSpeed', $this->intScrollSpeed);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Snap':
             $this->mixSnap = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'snap', $mixValue);
             }
             break;
         case 'SnapMode':
             try {
                 $this->strSnapMode = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'snapMode', $this->strSnapMode);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'SnapTolerance':
             try {
                 $this->intSnapTolerance = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'snapTolerance', $this->intSnapTolerance);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Stack':
             $this->mixStack = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'stack', $mixValue);
             }
             break;
         case 'ZIndex':
             try {
                 $this->intZIndex = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'zIndex', $this->intZIndex);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         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;
             }
     }
 }
		public function __set($strName, $mixValue) {
			$this->blnModified = true;

			switch ($strName) {
				// MISC
				case "DateTime":
					try {
						$dttDate = QType::Cast($mixValue, QType::DateTime);
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

					if (!is_null($dttDate))
						$this->intTimestamp = $dttDate->Timestamp;
					else
						$this->intTimestamp = null;

					break;

				case "CalendarType":
					try {
						$this->strCalendarType = QType::Cast($mixValue, QType::String);
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
					break;

//				case "MinimumDate": $this->dttMinimumDate = QType::Cast($mixValue, QType::Date); break;
//				case "MaximumDate": $this->dttMaximumDate = QType::Cast($mixValue, QType::Date); break;
				default:
					try {
						parent::__set($strName, $mixValue);
						break;
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}
 /**
  * PHP __set magic method implementation
  * @param string $strName Name of the property
  * @param string $mixValue Value of the property
  *
  * @throws Exception|QCallerException
  * @throws Exception|QInvalidCastException
  */
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // APPEARANCE
         case "Columns":
             try {
                 $this->intColumns = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Format":
             try {
                 $this->strFormat = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Text":
             try {
                 $this->strText = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "LabelForRequired":
             try {
                 $this->strLabelForRequired = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "LabelForRequiredUnnamed":
             try {
                 $this->strLabelForRequiredUnnamed = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "LabelForTooShort":
             try {
                 $this->strLabelForTooShort = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "LabelForTooShortUnnamed":
             try {
                 $this->strLabelForTooShortUnnamed = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "LabelForTooLong":
             try {
                 $this->strLabelForTooLong = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "LabelForTooLongUnnamed":
             try {
                 $this->strLabelForTooLongUnnamed = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Placeholder":
             try {
                 $this->strPlaceholder = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // BEHAVIOR
         // BEHAVIOR
         case "CrossScripting":
             try {
                 $this->strCrossScripting = QType::Cast($mixValue, QType::String);
                 // Protect from XSS to the best we can do with HTMLPurifier.
                 if ($this->strCrossScripting == QCrossScripting::HTMLPurifier) {
                     // If we are purifying using HTMLPurify, we will need the autoloader be included.
                     // We load lazy to make sure that the library is not loaded every time 'prepend.inc.php'
                     // or 'qcubed.inc.php' is inlcuded. HTMLPurifier is a HUGE and SLOW library. Lazy loading
                     // keeps it simpler.
                     require_once __EXTERNAL_LIBRARIES__ . '/htmlpurifier/library/HTMLPurifier.auto.php';
                     // We configure the default set of forbidden tags (elements) and attributes here
                     // so that the rules are applicable the moment CrossScripting is set to Purify.
                     // Use the QTextBox::SetPurifierConfig method to override these settings.
                     $this->objHTMLPurifierConfig = HTMLPurifier_Config::createDefault();
                     $this->objHTMLPurifierConfig->set('HTML.ForbiddenElements', 'script,applet,embed,style,link,iframe,body,object');
                     $this->objHTMLPurifierConfig->set('HTML.ForbiddenAttributes', '*@onfocus,*@onblur,*@onkeydown,*@onkeyup,*@onkeypress,*@onmousedown,*@onmouseup,*@onmouseover,*@onmouseout,*@onmousemove,*@onclick');
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "MaxLength":
             try {
                 $this->intMaxLength = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "MinLength":
             try {
                 $this->intMinLength = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ReadOnly":
             try {
                 $this->blnReadOnly = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Rows":
             try {
                 $this->intRows = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "TextMode":
             try {
                 $this->strTextMode = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ValidateTrimmed":
             try {
                 $this->blnValidateTrimmed = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // LAYOUT
         // LAYOUT
         case "Wrap":
             try {
                 $this->blnWrap = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
Example #10
0
 public function __set($strText, $mixValue)
 {
     switch ($strText) {
         case "ContainerClass":
             try {
                 // Bootstrap::ContainerFluid or Bootstrap::Container
                 $this->strContainerClass = QType::Cast($mixValue, QType::String);
                 break;
             } catch (\QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "HeaderText":
             try {
                 $this->strHeaderText = QType::Cast($mixValue, QType::String);
                 break;
             } catch (\QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "HeaderAnchor":
             try {
                 $this->strHeaderAnchor = QType::Cast($mixValue, QType::String);
                 break;
             } catch (\QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Value":
         case "SelectedId":
             try {
                 $this->strSelectedId = QType::Cast($mixValue, QType::String);
                 break;
             } catch (\QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "StyleClass":
             try {
                 $mixValue = QType::Cast($mixValue, QType::String);
                 $this->RemoveCssClass($this->strStyleClass);
                 $this->AddCssClass($mixValue);
                 $this->strStyleClass = $mixValue;
                 break;
             } catch (\QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strText, $mixValue);
             } catch (\QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         case 'ColumnLabels':
             try {
                 $this->arrColumnLabels = QType::Cast($mixValue, QType::ArrayType);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 return parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
 /**
  * PHP magic method to set the value of class properties
  *
  * @param string $strName Name of the property
  * @param string $mixValue Value of the property
  *
  * @return mixed|void
  * @throws Exception
  * @throws QCallerException
  * @throws QInvalidCastException
  */
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         case "CacheFolder":
             try {
                 $this->strCacheFolder = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "CacheFilename":
             try {
                 $this->strCacheFilename = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "AlternateText":
             try {
                 $this->strAlternateText = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ImageType":
             try {
                 $this->strImageType = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "JpegQuality":
             try {
                 $this->intJpegQuality = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case "Style":
             try {
                 /** @var QDataGridRowStyle $objStyle */
                 $objStyle = QType::Cast($mixValue, "QDataGridRowStyle");
                 $this->BackColor = $objStyle->BackColor;
                 $this->BorderColor = $objStyle->BorderColor;
                 $this->BorderStyle = $objStyle->BorderStyle;
                 $this->BorderWidth = $objStyle->BorderWidth;
                 $this->CssClass = $objStyle->CssClass;
                 $this->FontBold = $objStyle->FontBold;
                 $this->FontItalic = $objStyle->FontItalic;
                 $this->FontNames = $objStyle->FontNames;
                 $this->FontOverline = $objStyle->FontOverline;
                 $this->FontSize = $objStyle->FontSize;
                 $this->FontStrikeout = $objStyle->FontStrikeout;
                 $this->FontUnderline = $objStyle->FontUnderline;
                 $this->ForeColor = $objStyle->ForeColor;
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
                 break;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case 'AlsoResize':
             $this->mixAlsoResize = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'alsoResize', $mixValue);
             }
             break;
         case 'Animate':
             try {
                 $this->blnAnimate = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'animate', $this->blnAnimate);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'AnimateDuration':
             $this->mixAnimateDuration = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'animateDuration', $mixValue);
             }
             break;
         case 'AnimateEasing':
             try {
                 $this->strAnimateEasing = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'animateEasing', $this->strAnimateEasing);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'AspectRatio':
             $this->mixAspectRatio = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'aspectRatio', $mixValue);
             }
             break;
         case 'AutoHide':
             try {
                 $this->blnAutoHide = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'autoHide', $this->blnAutoHide);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Cancel':
             $this->mixCancel = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'cancel', $mixValue);
             }
             break;
         case 'Containment':
             $this->mixContainment = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'containment', $mixValue);
             }
             break;
         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 'Distance':
             try {
                 $this->intDistance = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'distance', $this->intDistance);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Ghost':
             try {
                 $this->blnGhost = QType::Cast($mixValue, QType::Boolean);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'ghost', $this->blnGhost);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Grid':
             try {
                 $this->arrGrid = QType::Cast($mixValue, QType::ArrayType);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'grid', $this->arrGrid);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Handles':
             $this->mixHandles = $mixValue;
             if ($this->OnPage) {
                 $this->CallJqUiMethod(true, 'option', 'handles', $mixValue);
             }
             break;
         case 'Helper':
             try {
                 $this->strHelper = QType::Cast($mixValue, QType::String);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'helper', $this->strHelper);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'MaxHeight':
             try {
                 $this->intMaxHeight = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'maxHeight', $this->intMaxHeight);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'MaxWidth':
             try {
                 $this->intMaxWidth = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'maxWidth', $this->intMaxWidth);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'MinHeight':
             try {
                 $this->intMinHeight = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'minHeight', $this->intMinHeight);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'MinWidth':
             try {
                 $this->intMinWidth = QType::Cast($mixValue, QType::Integer);
                 if ($this->OnPage) {
                     $this->CallJqUiMethod(true, 'option', 'minWidth', $this->intMinWidth);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         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;
             }
     }
 }
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // APPEARANCE
         case "Noun":
             try {
                 return $this->strNoun = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "NounPlural":
             try {
                 return $this->strNounPlural = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // BEHAVIOR
         // BEHAVIOR
         case "Paginator":
             try {
                 $objToReturn = $this->objPaginator = QType::Cast($mixValue, 'QPaginatorBase');
                 if ($this->objPaginator->Form->FormId != $this->Form->FormId) {
                     throw new QCallerException('The assigned paginator must belong to the same form that this control belongs to.');
                 }
                 $objToReturn->SetPaginatedControl($this);
                 return $objToReturn;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "PaginatorAlternate":
             try {
                 $objToReturn = $this->objPaginatorAlternate = QType::Cast($mixValue, 'QPaginatorBase');
                 if ($this->objPaginatorAlternate->Form->FormId != $this->Form->FormId) {
                     throw new QCallerException('The assigned paginator must belong to the same form that this control belongs to.');
                 }
                 $objToReturn->SetPaginatedControl($this);
                 return $objToReturn;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "UseAjax":
             try {
                 $objToReturn = $this->blnUseAjax = QType::Cast($mixValue, QType::Boolean);
                 if ($this->objPaginator) {
                     $this->objPaginator->UseAjax = $objToReturn;
                 }
                 if ($this->objPaginatorAlternate) {
                     $this->objPaginatorAlternate->UseAjax = $objToReturn;
                 }
                 return $objToReturn;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ItemsPerPage":
             if ($this->objPaginator) {
                 try {
                     $intToReturn = $this->objPaginator->ItemsPerPage = $mixValue;
                     if ($this->objPaginatorAlternate) {
                         $this->objPaginatorAlternate->ItemsPerPage = $intToReturn;
                     }
                     return $intToReturn;
                 } catch (QCallerException $objExc) {
                     $objExc->IncrementOffset();
                     throw $objExc;
                 }
             } else {
                 throw new QCallerException('Setting ItemsPerPage requires a Paginator to be set');
             }
         case "TotalItemCount":
             if ($this->objPaginator) {
                 try {
                     $intToReturn = $this->objPaginator->TotalItemCount = $mixValue;
                     if ($this->objPaginatorAlternate) {
                         $this->objPaginatorAlternate->TotalItemCount = $intToReturn;
                     }
                     return $intToReturn;
                 } catch (QCallerException $objExc) {
                     $objExc->IncrementOffset();
                     throw $objExc;
                 }
             } else {
                 throw new QCallerException('Setting TotalItemCount requires a Paginator to be set');
             }
             // MISC
         // MISC
         case "DataSource":
             return $this->objDataSource = $mixValue;
         case "PageNumber":
             if ($this->objPaginator) {
                 try {
                     $intToReturn = $this->objPaginator->PageNumber = $mixValue;
                     if ($this->objPaginatorAlternate) {
                         $this->objPaginatorAlternate->PageNumber = $intToReturn;
                     }
                     return $intToReturn;
                 } catch (QCallerException $objExc) {
                     $objExc->IncrementOffset();
                     throw $objExc;
                 }
             } else {
                 throw new QCallerException('Setting TotalItemCount requires a Paginator to be set');
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
                 break;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         case "objAsset":
             $this->objAsset = $mixValue;
             break;
         case "blnEditMode":
             $this->blnEditMode = $mixValue;
             break;
         case "strTitleVerb":
             $this->strTitleVerb = $mixValue;
             break;
         case "dtgAssetTransaction":
             $this->dtgAssetTransaction = $mixValue;
             break;
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
 public function __set($strName, $mixValue)
 {
     // Whenever we set a property, we must set the Modified flag to true
     $this->blnModified = true;
     try {
         switch ($strName) {
             case 'Value':
                 return $this->intValue = QType::Cast($mixValue, QType::Integer);
             case 'Padding':
                 return $this->strPadding = QType::Cast($mixValue, QType::String);
             case 'UseAjax':
                 $blnToReturn = $this->blnUseAjax = QType::Cast($mixValue, QType::Boolean);
                 // Whenever we change UseAjax, we must be sure to update our two buttons
                 // and their defined actions.
                 $this->SetupButtonActions();
                 return $blnToReturn;
             default:
                 return parent::__set($strName, $mixValue);
         }
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
 }
Example #18
0
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // APPEARANCE
         case "Text":
             try {
                 $this->strText = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "TagName":
             try {
                 $this->strTagName = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Padding":
             try {
                 $this->strPadding = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "HorizontalAlign":
             try {
                 $this->strHorizontalAlign = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "VerticalAlign":
             try {
                 $this->strVerticalAlign = 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;
     }
 }
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         case "objInventoryLocationArray":
             $this->objInventoryLocationArray = $mixValue;
             break;
         case "strTitleVerb":
             $this->strTitleVerb = $mixValue;
             break;
         case "blnEditMode":
             $this->blnEditMode = $mixValue;
             break;
         case "dtgInventoryTransact":
             $this->dtgInventoryTransact = $mixValue;
             break;
         case "intTransactionTypeId":
             $this->intTransactionTypeId = $mixValue;
             break;
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
Example #20
0
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // APPEARANCE
         case "Text":
             try {
                 $this->strText = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Format":
             try {
                 $this->strFormat = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Template":
             try {
                 if ($mixValue) {
                     if (file_exists($mixValue)) {
                         $this->strTemplate = QType::Cast($mixValue, QType::String);
                     } else {
                         throw new QCallerException('Template file does not exist: ' . $mixValue);
                     }
                 } else {
                     $this->strTemplate = null;
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "AutoRenderChildren":
             try {
                 $this->blnAutoRenderChildren = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "TagName":
             try {
                 $this->strTagName = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "HtmlEntities":
             try {
                 $this->blnHtmlEntities = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Padding":
             try {
                 $this->strPadding = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "DropTarget":
             try {
                 $this->blnDropTarget = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "HorizontalAlign":
             try {
                 $this->strHorizontalAlign = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "VerticalAlign":
             try {
                 $this->strVerticalAlign = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ResizeHandleDirection":
             try {
                 $this->strResizeHandleDirection = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ResizeHandleMinimum":
             try {
                 $this->intResizeHandleMinimum = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ResizeHandleMaximum":
             try {
                 $this->intResizeHandleMaximum = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
		public function __set($strName, $mixValue) {
			$this->blnModified = true;

			switch ($strName) {
				// APPEARANCE
				case "Text":
					try {
						$this->strText = QType::Cast($mixValue, QType::String);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
				case "TextAlign":
					try {
						$this->strTextAlign = QType::Cast($mixValue, QType::String);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case "HtmlEntities":
					try {
						$this->blnHtmlEntities = QType::Cast($mixValue, QType::Boolean);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				// MISC
				case "Checked":
					try {
						$this->blnChecked = QType::Cast($mixValue, QType::Boolean);
						break;
					} catch (QInvalidCastException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
					
				default:
					try {
						parent::__set($strName, $mixValue);
						break;
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // BEHAVIOR
         case "ItemsPerPage":
             try {
                 if ($mixValue > 0) {
                     return $this->intItemsPerPage = QType::Cast($mixValue, QType::Integer);
                 } else {
                     return $this->intItemsPerPage = 10;
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "PageNumber":
             try {
                 $intNewPageNum = QType::Cast($mixValue, QType::Integer);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             if ($intNewPageNum > 1) {
                 if ($intNewPageNum > $this->PageCount) {
                     $intNewPageNum = max($this->PageCount, 1);
                 }
                 return $this->intPageNumber = $intNewPageNum;
             } else {
                 return $this->intPageNumber = 1;
             }
             break;
         case "TotalItemCount":
             try {
                 if ($mixValue > 0) {
                     return $this->intTotalItemCount = QType::Cast($mixValue, QType::Integer);
                 } else {
                     return $this->intTotalItemCount = 0;
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "UseAjax":
             try {
                 $blnToReturn = $this->blnUseAjax = QType::Cast($mixValue, QType::Boolean);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // Because we are switching to/from Ajax, we need to reset the events
             $this->RemoveAllActions('onclick');
             $this->Setup();
             return $blnToReturn;
         case 'WaitIcon':
             try {
                 $mixToReturn = $this->objWaitIcon = $mixValue;
                 //ensure we update our ajax action to use it
                 $this->RemoveAllActions('onclick');
                 $this->Setup();
                 return $mixToReturn;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 return parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
 /**
  * PHP magic method
  *
  * @param string $strName  Property name
  * @param string $mixValue Property value
  *
  * @return mixed
  * @throws Exception|QCallerException
  */
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // Deprecated
         case 'TargetControlId':
             try {
                 return $this->strTargetControlId = QType::Cast($mixValue, QType::String);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 return parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         case 'Example':
             try {
                 return $this->intExample = QType::Cast($mixValue, QType::Integer);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Foo':
             try {
                 return $this->strFoo = QType::Cast($mixValue, QType::String);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 return parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
Example #25
0
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         case "SelectedIndex":
             try {
                 $mixValue = QType::Cast($mixValue, QType::Integer);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // Special Case
             if ($mixValue == -1) {
                 $mixValue = null;
             }
             if ($mixValue < 0 || $mixValue > count($this->objItemsArray) - 1) {
                 throw new QIndexOutOfRangeException($mixValue, "SelectedIndex");
             }
             for ($intIndex = 0; $intIndex < count($this->objItemsArray); $intIndex++) {
                 if ($mixValue == $intIndex) {
                     $this->objItemsArray[$intIndex]->Selected = true;
                 } else {
                     $this->objItemsArray[$intIndex]->Selected = false;
                 }
             }
             return $mixValue;
             break;
         case "SelectedName":
             foreach ($this->objItemsArray as $objItem) {
                 if ($objItem->Name == $mixValue) {
                     $objItem->Selected = true;
                 } else {
                     $objItem->Selected = false;
                 }
             }
             return $mixValue;
             break;
         case "SelectedValue":
             foreach ($this->objItemsArray as $objItem) {
                 if ($objItem->Value == $mixValue) {
                     $objItem->Selected = true;
                 } else {
                     $objItem->Selected = false;
                 }
             }
             return $mixValue;
             break;
         case "SelectedNames":
             try {
                 $mixValue = QType::Cast($mixValue, QType::ArrayType);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             foreach ($this->objItemsArray as $objItem) {
                 $objItem->Selected = false;
                 foreach ($mixValue as $mixName) {
                     if ($objItem->Name == $mixName) {
                         $objItem->Selected = true;
                         break;
                     }
                 }
             }
             return $mixValue;
             break;
         case "SelectedValues":
             try {
                 $mixValue = QType::Cast($mixValue, QType::ArrayType);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             foreach ($this->objItemsArray as $objItem) {
                 $objItem->Selected = false;
                 foreach ($mixValue as $mixName) {
                     if ($objItem->Value == $mixName) {
                         $objItem->Selected = true;
                         break;
                     }
                 }
             }
             return $mixValue;
             break;
         case "SelectedIndexes":
             try {
                 $intIndexArray = QType::Cast($mixValue, QType::ArrayType);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             //First remove all indexes
             $this->SelectedIndex = -1;
             //Assign selected
             foreach ($intIndexArray as $intIndex) {
                 if ($this->objItemsArray[$intIndex]) {
                     $this->objItemsArray[$intIndex]->Selected = true;
                 } else {
                     throw new QIndexOutOfRangeException($intIndex, "SelectedIndexes");
                 }
             }
             break;
         default:
             try {
                 parent::__set($strName, $mixValue);
                 break;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // APPEARANCE
         case "Text":
             try {
                 $this->strText = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "XCoordinate":
             try {
                 $this->intXCoordinate = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "YCoordinate":
             try {
                 $this->intYCoordinate = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "BackgroundTransparent":
             try {
                 $this->blnBackgroundTransparent = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // BEHAVIOR
         // BEHAVIOR
         case "ImageType":
             try {
                 $this->strImageType = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Quality":
             try {
                 $this->intQuality = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "SmoothFont":
             try {
                 $this->blnSmoothFont = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // LAYOUT
         // LAYOUT
         case "HorizontalAlign":
             try {
                 $this->strHorizontalAlign = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "VerticalAlign":
             try {
                 $this->strVerticalAlign = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "PaddingWidth":
             try {
                 $this->intPaddingWidth = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "PaddingHeight":
             try {
                 $this->intPaddingHeight = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Space":
             try {
                 $this->intSpace = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Tightness":
             try {
                 $this->intTightness = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Angle":
             try {
                 $this->intAngle = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "CacheFolder":
             try {
                 $this->strCacheFolder = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // OVERRIDDEN SETTERS
         // OVERRIDDEN SETTERS
         case "ForeColor":
             try {
                 $mixValue = strtolower(QType::Cast($mixValue, QType::String));
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             if (strlen($mixValue) != 6) {
                 throw new QInvalidCastException('ForeColor must be a 6-digit hexadecimal value');
             }
             // Verify ControlId is only Hexadecimal Digits
             $strMatches = array();
             $strPattern = '/[a-f0-9]*/';
             preg_match($strPattern, $mixValue, $strMatches);
             if (count($strMatches) && $strMatches[0] == $mixValue) {
                 return $this->strForeColor = $mixValue;
             } else {
                 throw new QInvalidCastException('ForeColor must be a 6-digit hexadecimal value');
             }
             break;
         case "BackColor":
             try {
                 $mixValue = strtolower(QType::Cast($mixValue, QType::String));
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             if (strlen($mixValue) != 6) {
                 throw new QInvalidCastException('BackColor must be a 6-digit hexadecimal value');
             }
             // Verify ControlId is only Hexadecimal Digits
             $strMatches = array();
             $strPattern = '/[a-f0-9]*/';
             preg_match($strPattern, $mixValue, $strMatches);
             if (count($strMatches) && $strMatches[0] == $mixValue) {
                 return $this->strBackColor = $mixValue;
             } else {
                 throw new QInvalidCastException('BackColor must be a 6-digit hexadecimal value');
             }
             break;
         case "FontSize":
             try {
                 $this->strFontSize = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Width":
             try {
                 $this->strWidth = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "Height":
             try {
                 $this->strHeight = QType::Cast($mixValue, QType::Integer);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "FontNames":
             try {
                 $mixValue = QType::Cast($mixValue, QType::String);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // Make Sure Font File Exists
             if (file_exists(dirname(QApplication::$ScriptFilename) . '/' . $mixValue)) {
                 $strFontPath = dirname(QApplication::$ScriptFilename) . '/' . $mixValue;
             } else {
                 if (file_exists(sprintf('%s/fonts/%s', __QCUBED_CORE__, $mixValue))) {
                     $strFontPath = sprintf('%s/fonts/%s', __QCUBED_CORE__, $mixValue);
                 } else {
                     throw new QCallerException('Cannot find font file: ' . $mixValue);
                 }
             }
             $this->strFontNames = $strFontPath;
             // Figure Out Font Type
             $strFontExtension = substr($mixValue, strlen($mixValue) - 3);
             $strFontExtension = strtolower($strFontExtension);
             // Based on Font Type, Calculate Bounding Box
             switch ($strFontExtension) {
                 case 'ttf':
                     break;
                 case 'pfb':
                     $strFontPath = substr($strFontPath, 0, strlen($strFontPath) - 3) . 'afm';
                     if (!file_exists($strFontPath)) {
                         throw new QCallerException('Cannot find accompanying Font Metrics file: ' . substr($mixValue, 0, strlen($mixValue) - 3) . 'afm');
                     }
                     break;
                 case 'afm':
                     throw new QCallerException('AFM is only a Font Metrics file.  You must provide a PFB file for PostScript Type 1 Typefaces: ' . $mixValue);
                 default:
                     throw new QCallerException('Cannot Determine Font Type: ' . $mixValue);
             }
             break;
         default:
             try {
                 parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
Example #27
0
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         case 'CalendarImageSource':
             try {
                 return $this->strCalendarImageSource = QType::Cast($mixValue, QType::Integer);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 return parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         case "ImageStandard":
             try {
                 if ($mixValue instanceof QImageBase) {
                     $this->mixImageStandard = $mixValue;
                 } else {
                     $this->mixImageStandard = QType::Cast($mixValue, QType::String);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ImageHover":
             try {
                 if ($mixValue instanceof QImageBase) {
                     $this->mixImageHover = $mixValue;
                 } else {
                     $this->mixImageHover = QType::Cast($mixValue, QType::String);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "AltText":
             try {
                 $this->strAltText = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "LinkUrl":
             try {
                 $this->strLinkUrl = 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;
     }
 }
Example #29
0
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         // BEHAVIOR
         case "ItemsPerPage":
             try {
                 if ($mixValue > 0) {
                     return $this->intItemsPerPage = QType::Cast($mixValue, QType::Integer);
                 } else {
                     return $this->intItemsPerPage = 10;
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "PageNumber":
             try {
                 $intNewPageNum = QType::Cast($mixValue, QType::Integer);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             if ($intNewPageNum > 1) {
                 if ($intNewPageNum > $this->PageCount) {
                     $intNewPageNum = max($this->PageCount, 1);
                 }
                 return $this->intPageNumber = $intNewPageNum;
             } else {
                 return $this->intPageNumber = 1;
             }
             break;
         case "TotalItemCount":
             try {
                 if ($mixValue > 0) {
                     return $this->intTotalItemCount = QType::Cast($mixValue, QType::Integer);
                 } else {
                     return $this->intTotalItemCount = 0;
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "UseAjax":
             try {
                 $blnToReturn = $this->blnUseAjax = QType::Cast($mixValue, QType::Boolean);
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // Because we are switching to/from Ajax, we need to reset the events
             $this->RemoveAllActions('onclick');
             if ($this->blnUseAjax) {
                 $this->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'Page_Click'));
             } else {
                 $this->AddAction(new QClickEvent(), new QServerControlAction($this, 'Page_Click'));
             }
             $this->AddAction(new QClickEvent(), new QTerminateAction());
             return $blnToReturn;
         default:
             try {
                 return parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
     }
 }
 /**
  * PHP __set magic method implementation
  * @param string $strName
  * @param string $mixValue
  *
  * @return mixed
  * @throws QInvalidCastException|QCallerException
  */
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         // APPEARANCE
         case "Text":
             try {
                 $val = QType::Cast($mixValue, QType::String);
                 if ($val !== $this->strText) {
                     $this->strText = $val;
                     $this->blnModified = true;
                 }
                 return $this->strText;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "TextAlign":
             try {
                 $val = QType::Cast($mixValue, QType::String);
                 if ($val !== $this->strTextAlign) {
                     $this->strTextAlign = $val;
                     $this->blnModified = true;
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "HtmlEntities":
             try {
                 $this->blnHtmlEntities = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // MISC
         // MISC
         case "Checked":
             try {
                 $val = QType::Cast($mixValue, QType::Boolean);
                 if ($val != $this->blnChecked) {
                     $this->blnChecked = $val;
                     $this->AddAttributeScript('prop', 'checked', $val);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             // Copy certain attributes to the label styler when assigned since its part of the control.
         // Copy certain attributes to the label styler when assigned since its part of the control.
         case 'CssClass':
             try {
                 parent::__set($strName, $mixValue);
                 $this->getCheckLabelStyler()->CssClass = $mixValue;
                 // assign to both checkbox and label so they can be styled together using css
                 $this->blnModified = true;
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
                 break;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }