/** * @param string $value */ public function setValue($value) { // This should be factored out, currently there is one exception where a value needs to be parsed before storing in DB if ($value && $this->getIdentifier() == srCertificateTypeSetting::IDENTIFIER_VALIDITY) { /** @var srCertificateDefinition $definition */ $definition = srCertificateDefinition::find($this->getDefinitionId()); $validity_type = $definition->getSettingByIdentifier(srCertificateTypeSetting::IDENTIFIER_VALIDITY_TYPE)->getValue(); $value = srCertificateTypeSetting::formatValidityBasedOnType($validity_type, $value); } $this->value = $value; }