Documentation for Wicker

A quick introduction to the framework:

  • All page and API requests go through ./bottleneck.php. This file makes security checks and determines what kind of request is being made.
  • The rest of the framework lives inside subdirectories of ./serve: Configuration info is in config, page modules are in components, libraries live in functions, business logic libraries for different aspects of the site live in sections, output formats are defined in generate, and request handlers ("pages") are defined in handler.
  • functions/Request.php runs the requested URL through a very flexible parser to determine the appropriate handler. If the path component of the URL ends in, say, ;JSON, then the app will ask the handler to output in JSON format. (If not available, the handler is switched to handler/Error.php.)
  • Page-specific processing is confined to the process() method of each handler. Delegate as much as reasonable to the ./sections/*.php libraries. I recommend delegating all query-building to those files.
  • Messages may be passed to the user by way of SysMsg::add() calls. SysMsg::dbg('foo') will display the passed message, but only on the development website. Notably, all database requests and responses You can add your own message templates to functions/SysMsg
  • Caching of scripts and styles is controlled by ./serve/config/FileVesioning.php — increment the version number of a listed file to force browsers to grab the new version.