/** * @param $initPattern * @return void */ public function __construct($initPattern = null) { parent::__construct(); // If there is a pattern passed thru then copy from request if ($initPattern != null) { $this->copyVarsFromRequest($initPattern); } $this->copyVarsFromRequest(WebPage::SAVE_URL); // Ensure that the known fields foreach (TamperGuard::$knownFields as $key) { $this->copyVarsFromRequest($key); $this->addExempt($key); } }
/** * @param $varsToProcess * @return void */ public function __construct(&$varsToProcess = null) { parent::__construct(); if ($varsToProcess == null) { $this->formVars = $this->getRequestVars(); } else { if (is_array($varsToProcess)) { $this->formVars = $varsToProcess; } else { if (is_string($varsToProcess)) { $this->formVars = $this->convertQueryStringToArray($varsToProcess); } } } $this->decryptRequestVars($this->formVars); }