Standart functions



    As member of the MVC paradigm each package may have up to 5 standart functions (in the beyond list they are placed in the exact order as they are called in the page generation function). They are:

  1. pre_generation( $Options ) - this function is called before any generating actions and used for some validations. It does not modify page's content because it is called before any generations and controller/view calls.
  2. pre_process( $Options , $ProcessingString , &$Changed ) - this function is called to modify structure of the generated page, but some times it is also used to replace some macro.
  3. controller( $Options ) - this function processes all commands from gui and external requests (ajax requests for example)
  4. view( $Options ) - this (and only this) function generates GUI and any other output
  5. post_process( $Options , $ProcessingString , &$Changed ) - this function almost always is used to replace macro.

    Here $Options are page generation settings wich are taken from the page description. $ProcessingString is a generating page's content wich can be modified by MVC components. And &$Changed is flag wich must be set if the $ProcessingString was changed while function execution.

2009 © ultimix