webmcp

diff framework/env/request/initialize.lua @ 316:a2c733535b8e

Support intervals; Interactive shell requires application name now
author jbe
date Mon Mar 23 16:05:56 2015 +0100 (2015-03-23)
parents
children e3e2a03f75b2
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/framework/env/request/initialize.lua	Mon Mar 23 16:05:56 2015 +0100
     1.3 @@ -0,0 +1,15 @@
     1.4 +--[[--
     1.5 +request.initialize()
     1.6 +
     1.7 +Executes all request initializers. Request initializers are added (and executed) using the request.for_each(...) call. Calling request.configure(...) before invoking request.initialize() for the first time also adds a request initializer.
     1.8 +
     1.9 +--]]--
    1.10 +function request.initialize()
    1.11 +  _G.app = {}  -- may be overwritten or modified by request initializers
    1.12 +  do
    1.13 +    request._in_progress = true  -- NOTE: must be set to true before initializer functions are called
    1.14 +    for i, func in ipairs(request._initializers) do
    1.15 +      func()
    1.16 +    end
    1.17 +  end
    1.18 +end

Impressum / About Us