How a request is handled

  1. Apache receives the request from the User Agent (a Web browser like Firefox or Internet Explorer)
  2. Apache's mod_rewrite calls AWF's index.php, because of the RewriteRule defined in the .htaccess file located in the main directory
  3. AWF's inc/sessions.inc cares about starting a PHP session (global $_SESSION array) and imports URL parameters into the $_GET array
  4. If no user is logged in, inc/caching.inc looks for a valid cache file in cache/awf/ (full-page caching)
  5. If it finds one, the page will be served and the request ends at this point
  6. If not, the class library in inc/classes.inc is included (just the most important classes are defined there; the rest is included on demand using PHP's autoloading feature)
  7. inc/config.inc creates an instance of the AWF class ($awf) and calls it's init method $awf->init()
  8. AWF loads the config from the file inc/config.ini, starts the database connection and creates an instance of all required classes:
    1. AWF_Sites (determines the current site - sets constants according to the site configuration)
    2. AWF_Designs (cares about loading the right design files and templates)
    3. AWF_Languages (looks up, which languages/charsets are available and will be used for this page; loads language files located in inc/lang/)
    4. AWF_ContentManager (creates an instance of all AWF_ContentContainer classes located in inc/classes/containers/)
  9. AWF then calls AWF_ContentManager::handle_request() which asks the Content Containers if they can handle the current request
  10. If not, the Error 404 page located in templates/errors/ is displayed
  11. If yes, inc/output.inc calls $awf->cms->output_page()
  12. The content manager then retrieves the requested content by calling AWF_ContentContainer::get_requested_content() (Smarty/Raw) or AWF_ContentContainer::get_requested_content_as_array() (XML)
  13. Depending on the request type, the content manager outputs the content using a Smarty Template (XHTML/HTML/WML), as XML or directly as raw data (used for images, for example)
  14. inc/shutdown.inc appends a line to the log file in sites/[site short name]/logs/YYYY_MM.log and creates a cache file, if caching is enabled
  15. The PHP session is closed

PDF version

Created: 09.01.2006 04:10 CET, Last Change: 09.01.2006 15:11 CET by admin

Login

or create a new account

Username


Password