Bootstrap

Flowchart When a request is sent to your server, the http daemon passes that to index.php, according to the rewriting rule in .htaccess. Index sets up a few constants and passes control to core/zBootstrap.php. In there, URLs are processed and served in 5 phases:

  1. init()
    The first thing the bootstrap does is to to load zoglair.cfg.php. Immediately after that, it cracks the URL, up to the language identifier (see URL Anatomy). Armed with the information collected so far, it queries the request headers to find out whether it is conditional (“if-modified-since”) or not. If it is, and the resource requested is a static file considered fresh, and no logging of cache hits is required, it sends a “304 Not Modified” header and exits.
  2. load()
    zObject and zoglair are loaded. $zoglair and $zDbms are constructed. Settings are loaded from the database. $zCahe and $zAuth are constructed.
  3. exec()
    If the request (step #1) was indeed conditional but it was not served because logging is required, then it is logged, the proper header is sent and the bootstrap exits. Otherwise, what's left from the URL is sent to process_url(), after the following checks:
  4. head()
    HTTP response headers are sent.
  5. done()
    If the requested resource is a static file, then the bootstrap's job ends here. Otherwise, it is first filtered through ZML.
(C) Nick B. Cassos - All Rights Reserved
powered by zoglair
page generated in 235ms (11 queries, 41ms)