Class Wigbi

Description

The Wigbi class.

This is the most central class of the Wigbi framework. It is used to start and stop the Wigbi application and provides it with many central utility functions and properties.

Two important properties are serverRoot and webRoot, which points out the application root folder for the executing FILE as well as the executng PAGE. These are useful when working with paths in a file or page that does not know where it executes.

Except these properties, the class features functions that do not belong anywhere else, in order to avoid small classes that serves a very limited purpose.

INCLUDE, START AND STOP WIGBI ************

To include the Wigbi framework, just include the wigbi/wigbi.php file at the very beginning of the page. This will include all PHP classes and enable session handling.

To start Wigbi, execute the start function in the head tag of the page. This will include the PHP classes that exist in wigbi/php, wigbi/seeds and wigbi/controls as well as the JavaScript classes that exist in the wigbi/js/system and the wigbi/js/ folders etc. Starting Wigbi will also initialize several classes, enable themes, connect to the database etc. So, in short, the start function will start the application :)

Remember to stop Wigbi when you do not need to use it anymore, for instance at the end of the page.

WIGBI RUNTIME BUILD (RTB) ***************

The application.runtimeBuild key in the configuration file can be used to set if Wigbi is to perform a Runtime Build operation each time it is started. An RTB operation will cause Wigbi to sync the database and JavaScript layer with all added seeds and controls.

During development, the RTB is really handy since it ensures that the system is kept in constant sync. However, when the system is up and running, RTB should only be enabled when the system needs to be synced.

Located in /wigbi_source/php/system/Wigbi.php (line 77)


	
			
Method Summary
 static array controlClasses ()
 static string fullUrl ()
 static string generateHtml ()
 static bool isAsyncPostBack ()
 static bool isPostBack ()
 static bool isPublicVariable (object $object, string $property)
 static array seedClasses ()
 static string serverRoot ()
 static void setGenerateHtml (string $value)
 static void setTheme ([ $value = null])
 static void start ()
 static void stop ()
 static void theme ()
 static string version ()
 static string webRoot ()
Methods
static controlClasses (line 105)

Get all controls that have been added to the wigbi/controls folder.

  • return: The value of the controlClasses property.
  • access: public
static array controlClasses ()
static fullUrl (line 136)

Get the the full URL of the current page, including the protocol and port.

  • return: The the full URL of the current page.
  • access: public
static string fullUrl ()
static generateHtml (line 152)

Get whether or not Wigbi is to generate any HTML when it is started.

  • return: Whether or not Wigbi is to generate any HTML when it is started.
  • access: public
static string generateHtml ()
static isAsyncPostBack (line 178)

Get whether or not the current page state is asynchronous.

  • return: Whether or not the current page state is asynchronous.
  • access: public
static bool isAsyncPostBack ()
static isPostBack (line 191)

Get whether or not the current page state contains posted data.

  • return: Whether or not the current page state contains posted data.
  • access: public
static bool isPostBack ()
static isPublicVariable (line 472)

Check whether or not an object variable is public.

This function exists since private and protected members are always visible to the owner class. This function can then be used to properly determine if the member is public or not.

  • return: Whether or not an object variable is public or not.
  • access: public
static bool isPublicVariable (object $object, string $property)
  • object $object: The object to inspect.
  • string $property: The property to inspect.
static seedClasses (line 234)

Get all classes that have been added to the wigbi/seeds folder.

  • return: All classes that have been added to the wigbi/seeds folder.
  • access: public
static array seedClasses ()
static serverRoot (line 271)

Get the path to the application root folder for the FILE.

The application root folder is where the wigbi folder exists.

Use this property if a path is to be used by the SERVER. It will make the path context independent, unlike absolute and relative file paths.

  • return: The path to the application root folder for the FILE.
  • access: public
static string serverRoot ()
static setGenerateHtml (line 165)

Set whether or not Wigbi is to generate any HTML when it is started.

  • access: public
static void setGenerateHtml (string $value)
  • string $value: Whether or not Wigbi is to generate any HTML when it is started.
static setTheme (line 648)
  • access: public
static void setTheme ([ $value = null])
  • $value
static start (line 486)

Start the Wigbi application.

  • access: public
static void start ()
static stop (line 631)

Stop the Wigbi application.

  • access: public
static void stop ()
static theme (line 642)
  • access: public
static void theme ()
static version (line 288)

Get the version of the currently running Wigbi application.

  • return: The version of the currently running Wigbi application.
  • access: public
static string version ()
static webRoot (line 307)

Get the path to the application root folder for the PAGE.

The application root folder is where the wigbi folder exists.

Use this property if a path is to be used by the CLIENT. It will make the path context independent, unlike absolute and relative URLs.

  • return: The path to the application root folder for the PAGE.
  • access: public
static string webRoot ()

Documentation generated on Sun, 27 Dec 2009 20:12:08 +0100 by phpDocumentor 1.4.1