Should be called after answering the request to allow the Target
to check if all required registry values have been set correctly.

@return boolean False if required values are missing.
497949
public function checkRegistryRequestsAnswers()
    {
        // Make sure \Gems_User_User gets userLoader variable.
        $extras['userLoader'] = $this;

        // Make sure that this code keeps working when _initSession
        // is removed from GemsEscort
        if (! $this->session instanceof \Zend_Session_Namespace) {
            $this->session = new \Zend_Session_Namespace('gems.' . GEMS_PROJECT_NAME . '.session');

            $idleTimeout = $this->project->getSessionTimeout();

            $this->session->setExpirationSeconds($idleTimeout);

            $extras['session'] = $this->session;
        }

        $this->addRegistryContainer($extras);
    }
1354238
public function afterRegistry()
    {
        parent::afterRegistry();

        $this->addColumn(new \Zend_Db_Expr(sprintf(
                "CASE WHEN gla_by IS NULL THEN '%s'
                    ELSE CONCAT(
                        COALESCE(gsf_last_name, '-'),
                        ', ',
                        COALESCE(CONCAT(gsf_first_name, ' '), ''),
                        COALESCE(gsf_surname_prefix, '')
                        )
                    END",
                $this->_('(no user)')
                )), 'staff_name');
        $this->addColumn(new \Zend_Db_Expr(sprintf(
                "CASE WHEN grs_id_user IS NULL THEN '%s'
                    ELSE CONCAT(
                        COALESCE(grs_last_name, '-'),
                        ', ',
                        COALESCE(CONCAT(grs_first_name, ' '), ''),
                        COALESCE(grs_surname_prefix, '')
                        )
                    END",
                $this->_('(no respondent)')
                )), 'respondent_name');
    }
1051191
public function isValid()
    {
        // get the submitted value
        $value = $this->field->getForm()->getFieldValue($this->field->getName());

        // required but not given
        if ($this->required && $value == null) {
            return false;
        } // if the field is not required and the value is empty, then it's also valid
        elseif (!$this->required && $value == "") {
            return true;
        }

        // check if multiple values are returned and if this is allowed.
        if (is_array($value) && !$this->field->isMultiple()) {
            return false;
        }

        // check if the submitted value(s) are in the options value's
        $options = $this->field->getOptions();

        if (!is_array($value)) {
            $value = (array)$value;
        }

        // check if the selected options exist
        if (!$this->checkIfOptionsExists($value, $options)) {
            return false;
        }

        return true;
    }
797556
public function isRemoteCheckRequired()
    {
        if ($this->uid && $this->sessionToken && $this->recheck) {
            if($this->recheck > (new DateTime('NOW'))) {
                return false;
            }
        }

        return true;
    }
178091
protected function checkRequired()
    {
        $errors = new Exceptions();
        foreach ($this->getRequiredKeys() as $required) {
            if (!isset($this->$required)) {
                $errors->add(new Exception('Required property "' . $required . '" is missing'));
            }
        }
        if (!$errors->empty()) {
            throw $errors;
        }
        return true;
    }
565648
public function checkRequired()
    {
        if (is_array($this->value)) {
            return (bool) $this->value;
        }

        $value = (string) $this->value;

        return $this->value || $value === '0';
    }
420705
private function hasRequiredParams()
    {
        return array_key_exists(self::PARAM_REMOTE_ADDR, $this->container) && array_key_exists(self::PARAM_USER_AGENT, $this->container);
    }
155284
public function checkRegistryRequestsAnswers()
    {
        if ((! $this->userId) && $this->currentUser) {
            $this->userId = $this->currentUser->getUserId();
        }
        return $this->loader && $this->request && parent::checkRegistryRequestsAnswers();
    }
1023485
public function processRequirements()
    {
        foreach ($this->requirements as $requirement)
        {
            if ( ! call_user_func($requirement, $this->resource, $this))
            {
                return false;
            }
        }

        return true;
    }
182163
protected function _isSessionRequiredAction()
    {
        foreach ($this->_getRequireSessionWithParams() as $sParam => $aValues) {
            $sValue = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter($sParam);
            if (isset($sValue)) {
                if (is_array($aValues)) {
                    if (isset($aValues[$sValue]) && $aValues[$sValue]) {
                        return true;
                    }
                } elseif ($aValues) {
                    return true;
                }
            }
        }

        return (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST');
    }
1015628
protected function shouldAutoPrepareForResponse(): bool
    {
        $request = request();

        return $request->isMethod('get') &&
            !in_array($request->path() ?? '', $this->autoPrepareResponseExcept);
    }
195582
public static function are_requirements_met() {
        if (self::$requirementsmet === null) {
            $requirementsmet = self::test_unoconv_path()->status === self::UNOCONVPATH_OK;
            $requirementsmet = $requirementsmet && self::is_minimum_version_met();
            self::$requirementsmet = $requirementsmet;
        }

        return self::$requirementsmet;
    }
695958
public function isValid() {
		
		$params = $this -> getParameters();
		$file 	= $this -> getFile();

		if(false === isset($params[0])) {
			return trigger_error(sprintf('Missing argument 1 for %s', __METHOD__), E_USER_ERROR);
		}

		if(false === ('-' . intval($params[0]) == '-' . $params[0])) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($params[0])), E_USER_ERROR);
		}

		$size = @filesize($file['tmp_name']);

		if(true === is_int($size)) {

			if($size >= $params[0]) {
				return true;
			}
		}

		return false;
	}
399915
public function afterRegistry()
    {
        parent::afterRegistry();

        if (! $this->menuActionController) {
            $this->menuActionController = $this->request->getControllerName();
        }
    }
1296989
protected function verifyRequiredData()
    {
        $errors = array(
            'missing' => array(),
            'invalid' => array()
        );
        $error = FALSE;
        if (!empty($this->properties['required'])) {
            foreach ($this->properties['required'] as $property => $type) {
                if (!isset($this->data[$property])) {
                    $errors['missing'][] = $property;
                    $error = TRUE;
                    continue;
                }
                if ($type !== NULL && gettype($this->data[$property]) !== $type) {
                    $errors['invalid'][] = $property;
                    $error = TRUE;
                }
            }
        }
        if ($error){
            $errorMsg = '';
            if (!empty($errors['missing'])){
                $errorMsg .= "Missing [".implode(",",$errors['missing']). "] ";
            }
            if (!empty($errors['invalid'])){
                $errorMsg .= "Invalid [".implode(",",$errors['invalid'])."]";
            }
            throw new InvalidData($errorMsg);
        }
        return $error;
    }
982319
public function validate()
    {
        if (is_numeric($this->categoryId) && $this->categoryId >= 1
                && is_numeric($this->forumId) && $this->forumId >= 1
                && is_numeric($this->threadId) && $this->threadId >= 1
                && !empty($this->threadSlug)) {
            return true;
        }
        return false;
    }
899645
protected function validateRequired()
  {
    if ($this->isRequired() && empty($this->value)) {
      $this->addError(sprintf($this->tmpl_err_required, $this->getName()));

      return false;
    }

    return true;
  }