How to implement “built-in” numerical integration?

Hi, I have a question about Numerical integration.
I want to implement numerical integration (e.g. via RectIntegrator) directly in expressions, for example:

S=numintRECT{x}(sin(x)*e^(x^2/8) 0 1 1000)*D+2.5

In theory, numintRect should be a function that returns a defined integral via integrator.Integral(). But how to implement it? The documentation provides an example for direct use in the code, but is it possible to do this as a Function or Expression? Which class is better to inherit from to have access to the integral function and the variable “x” as text parameters?