/** * @param ExecutionContextInterface $context */ public function isValidExpm(ExecutionContextInterface $context) { $expm = $this->getExpm(); if (!in_array($expm, array_keys(\Dominikzogg\ClassHelpers\getConstantsWithPrefix(__CLASS__, 'MONTH_')))) { $context->addViolationAt('expm', "Unknown expm '{$expm}' given!"); } }
/** * @param ExecutionContextInterface $context */ public function isValidStatus(ExecutionContextInterface $context) { $status = $this->getStatus(); if (!in_array($status, array_keys(\Dominikzogg\ClassHelpers\getConstantsWithPrefix(__CLASS__, 'RESPONSESTATUS_')))) { $context->addViolationAt('status', "Unknown status '{$status}' given!"); } }
/** * @param ExecutionContextInterface $context */ public function isValidReqType(ExecutionContextInterface $context) { $reqType = $this->getReqType(); if (!in_array($reqType, array_keys(\Dominikzogg\ClassHelpers\getConstantsWithPrefix(__CLASS__, 'REQTYPE_')))) { $context->addViolationAt('status', "Unknown reqType '{$reqType}' given!"); } }
/** * @param ExecutionContextInterface $context */ public function isValidUppCustomerGender(ExecutionContextInterface $context) { if (null === ($uppCustomerGender = $this->getUppCustomerGender())) { return; } if (!in_array($uppCustomerGender, array_keys(\Dominikzogg\ClassHelpers\getConstantsWithPrefix(__CLASS__, 'GENDER_')))) { $context->addViolationAt('uppCustomerGender', "Unknown uppCustomerGender '{$uppCustomerGender}' given!"); } }