The OpenD Programming Language

ifCalledFromWeb

This can be attached to any constructor or function called from the cgi system.

If it is present, the function argument can NOT be set from web params, but instead is set to the return value of the given func.

If func can take a parameter of type Cgi, it will be passed the one representing the current request. Otherwise, it must take zero arguments.

Any params in your function of type Cgi are automatically assumed to take the cgi object for the connection. Any of type Session (with an argument) is also assumed to come from the cgi object.

const arguments are also supported.

version(with_breaking_cgi_features)
struct ifCalledFromWeb (
alias func
)

Meta