property = $property; $this->allowed_values = $allowed_values; } protected function get_supported_properties(): array { return [ $this->property ]; } protected function do_convert( Conversion_Context $context, array $rule ): bool { $value = trim( $rule['value'] ); if ( '' === $value ) { return false; } if ( null !== $this->allowed_values && ! in_array( $value, $this->allowed_values, true ) ) { return false; } $context->set_prop( $this->property, String_Prop_Type::generate( $value ) ); return true; } }