Пример #1
0
 protected function RenderHelper($mixParameterArray, $strRenderMethod)
 {
     // Make sure the form is already "RenderBegun"
     if (!$this->objForm || $this->objForm->FormStatus != QForm::FormStatusRenderBegun) {
         if (!$this->objForm) {
             $objExc = new QCallerException('Control\'s form does not exist.  It could be that you are attempting to render after RenderEnd() has been called on the form.');
         } else {
             if ($this->objForm->FormStatus == QForm::FormStatusRenderEnded) {
                 $objExc = new QCallerException('Control cannot be rendered after RenderEnd() has been called on the form.');
             } else {
                 $objExc = new QCallerException('Control cannot be rendered until RenderBegin() has been called on the form.');
             }
         }
         // Incremement because we are two-deep below the call stack
         // (e.g. the Render function call, and then this RenderHelper call)
         $objExc->IncrementOffset();
         throw $objExc;
     }
     // Make sure this hasn't yet been rendered
     if ($this->blnRendered || $this->blnRendering) {
         $objExc = new QCallerException('This control has already been rendered: ' . $this->strControlId);
         // Incremement because we are two-deep below the call stack
         // (e.g. the Render function call, and then this RenderHelper call)
         $objExc->IncrementOffset();
         throw $objExc;
     }
     // Let's remember *which* render method was used to render this control
     $this->strRenderMethod = $strRenderMethod;
     // Apply any overrides (if applicable)
     if (count($mixParameterArray) > 0) {
         if (gettype($mixParameterArray[0]) != QType::String) {
             // Pop the first item off the array
             $mixParameterArray = array_reverse($mixParameterArray);
             array_pop($mixParameterArray);
             $mixParameterArray = array_reverse($mixParameterArray);
         }
         // Override
         try {
             $this->OverrideAttributes($mixParameterArray);
         } catch (QCallerException $objExc) {
             // Incremement Twice because we are two-deep below the call stack
             // (e.g. the Render function call, and then this RenderHelper call)
             $objExc->IncrementOffset();
             $objExc->IncrementOffset();
             throw $objExc;
         }
     }
     // Because we may be re-rendering a parent control, we need to make sure all "children" controls are marked as NOT being on the page.
     foreach ($this->GetChildControls() as $objChildControl) {
         $objChildControl->blnOnPage = false;
     }
     // Finally, let's specify that we have begun rendering this control
     $this->blnRendering = true;
 }
		public function __construct($strControlId) {
			parent::__construct("Cross Scripting Violation: Potential cross script injection in Control \"" .
				$strControlId . "\"\r\nTo allow any input on this TextBox control, set CrossScripting to QCrossScripting::Alow", 2);
		}
Пример #3
0
 public function __construct($strMessage, $intOffset = 2)
 {
     parent::__construct($strMessage, $intOffset);
 }
Пример #4
0
 public function __construct($strFormId)
 {
     parent::__construct(sprintf('Invalid Form State Data for "%s" object (session may have been lost)', $strFormId), 2);
 }
 public function __construct(QCallerException $objExc)
 {
     parent::__construct($objExc->getMessage(), $objExc->getCode());
     $this->intOffset = $objExc->Offset;
     $this->strTraceArray = $objExc->TraceArray;
     if ($objExc instanceof QDatabaseExceptionBase) {
         $this->strQuery = $objExc->Query;
     }
     $this->file = $this->strTraceArray[$this->intOffset]['file'];
     $this->line = $this->strTraceArray[$this->intOffset]['line'];
 }
Пример #6
0
 public function __get($strName)
 {
     switch ($strName) {
         case "ErrorNumber":
             return $this->intErrorNumber;
         case "Query":
             return $this->strQuery;
         default:
             return parent::__get($strName);
     }
 }
Пример #7
0
 public function __construct(QCallerException $objExc)
 {
     parent::__construct($objExc->getMessage(), $objExc->getCode());
     $this->intOffset = $objExc->Offset;
     $this->strTraceArray = $objExc->TraceArray;
     $this->file = $this->strTraceArray[$this->intOffset]['file'];
     $this->line = $this->strTraceArray[$this->intOffset]['line'];
 }
Пример #8
0
 public function __construct($intTokenType)
 {
     parent::__construct('Invalid Token Type found in file ' . QScriptParser::$CurrentParser->FilePath . ': ' . token_name($intTokenType));
 }
Пример #9
0
 public function __construct()
 {
     parent::__construct('Remote access to "' . QApplication::$RequestUri . '" has been disabled.' . "\r\nTo allow remote access to this script, set the ALLOW_REMOTE_ADMIN constant to TRUE\r\nor to \"" . $_SERVER['REMOTE_ADDR'] . '" in "configuration.inc.php".', 2);
 }