/bootstrap.php

Description

Bluewater MVC Core Bootstrap file.

This file is part of Bluewater MVC.
Copyright (c) 2006 - 2009 Walter Torres <walter@torres.ws>

NOTICE OF LICENSE
This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE. It is also available through the world-wide-web at: http://opensource.org/licenses/osl-3.0.php.
If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@bluewatermvc.org so one can sent to you immediately.

DISCLAIMER
Do not modify to this file if you wish to upgrade Bluewater MVC in the future. If you wish to customize Bluewater MVC for your needs please refer to http://web.bluewatermvc.org for more information. *

PHP version 5

version: $Revision: $
copyright: Copyright (c) 2006 - 2009 Walter Torres <walter@torres.ws>
link: http://web.bluewatermvc.org
date: $Date: $
modifiedby: $LastChangedBy: $
filename: $RCSfile: $
filesource: Source Code for this file
license: Open Software License (OSL 3.0)
Constants
APP = SITE_ROOT.'/app' (line 99)

APP defines where all the Application specific files reside.

This should be outside your web accessable directories. Do not place a slash at the end of this path.

constant: string
since: 1.0
name: APP
usedby: Bluewater_Helper::_loadHelper()
usedby: Bluewater_Helper::_loadHelper()
usedby: Bluewater_Config::__construct()
usedby: Bluewater_Config::locale()
BLUEWATER = LIBRARY.'/Bluewater' (line 139)

BLUEWATER defines where all the Bluewater MVC Core files reside.

This is a child directory of LIBRARY Do not place a slash at the end of this path.

constant: string
since: 1.0
name: BLUEWATER
usedby: Bluewater_Helper::_loadHelper()
usedby: Bluewater_Config::__construct()
usedby: Bluewater_Helper::_loadHelper()
CONTROL = APP.'/Controller' (line 169)

CONTROL defines where all the Application specific Controllers and business logic files reside.

This is a child directory of APP Do not place a slash at the end of this path.

since: 1.0
constant: string
name: CONTROL
usedby: Bluewater_Dispatcher::_load_controller()
CSS_PATH = WEB_ROOT.'css' (line 352)

CSS_PATH defines where CSS files are to be served from.

Use this constant to ensure quick access to the CSS files.

since: 1.0
constant: string
name: CSS_PATH
IMAGE_PATH = WEB_ROOT.'images' (line 365)

IMAGE_PATH defines where image files are to be served from.

Use this constant to ensure quick access to the image files.

since: 1.0
constant: string
name: IMAGE_PATH
JS_PATH = WEB_ROOT.'js' (line 339)

JS_PATH defines where Javascript files are to be served from.

Use this constant to ensure quick access to the script files.

since: 1.0
constant: string
name: JS_PATH
LIBRARY = SITE_ROOT.'/library' (line 85)

LIBRARY defines where all the third-partry libraries reside.

This should be outside your web accessable directories. Do not place a slash at the end of this path.

since: 1.0
constant: string
name: LIBRARY
usedby: library_loader() - path to Library Class files
MODEL = APP.'/Model' (line 154)

MODEL defines where all the Application specific Database support files reside.

This is a child directory of APP Do not place a slash at the end of this path.

since: 1.0
constant: string
name: MODEL
usedby: model_loader() - path to Application Model Class files
SITE_ROOT = '/home/bluewatermvc' (line 71)

This is the OS Path location that contains the "htdocs" (or public_html) directory. All other path constants are derived from this one.

Due to file locations, and procedures within Bluewater MVC, this path must be hand coded here. If the overall structure changes, this value has to change as well.

Do not place a slash at the end of this path.

since: 1.0
constant: string
name: SITE_ROOT
TEMPLATE = VIEW.'/Templates' (line 197)

TEMPLATE defines where all the Application specific GUI templates reside.

This is a child directory of VIEW Do not place a slash at the end of this path.

since: 1.0
constant: string
name: TEMPLATE
usedby: Bluewater_View::render()
VIEW = APP.'/View' (line 183)

VIEW defines where all the Application specific GUI pages reside.

This is a child directory of APP Do not place a slash at the end of this path.

since: 1.0
constant: string
name: VIEW
WEB_ROOT = $_web_root (line 326)

WEB_ROOT defines the actual URL used by the current application.

Use this constant to ensure proper pathing on all application links.

since: 1.0
constant: string
name: WEB_ROOT
WIN_IIS = $_iis (line 313)

WIN_IIS indicates if current server is Windows IIS

since: 1.0
constant: boolean
name: WIN_IIS
Functions
get_web_root (line 226)

Defines relative pathing of the web server

Similar to SITE_ROOT, except this defines relative pathing from the web server POV. This allows files to be moved, or the entire site to be relocated and all pathing will be uneffected.

author: Walter Torres <walter@torres.ws>
since: 1.0
access: public
void get_web_root ( &$_web_root, string $_web_root)
  • string $_web_root: default value of web root
  • &$_web_root
library_loader (line 409)

Class library autoloader using a pseudo namespace format.

If a Class is not already loaded within PHP, this magic function will attempt to load the class from within the Library directory.

Class names are in a pseudo namespace format: 'First_Second_Third', where each part of the class name is used to build a pathname for the class. The example here would be parsed into: /library/First/Second/Third.php The last word after the last underscore is assumed to be the actual file name of the class

If the class file can't be located, than a dummy class is created and an Exception is thrown.

author: Walter Torres <walter@torres.ws>
access: public
uses: LIBRARY - path to Library Class files
uses: Exception
void library_loader (string $_className)
  • string $_className: Class to load
model_loader (line 454)

Application Model Class autoloader using a pseudo namespace format.

Model Files are located in the model directory under the name of the Database they represent. Each file corresponds to an individual table. The Class name of these "model" files should be defined as: class {dbName}_{tableName} Using this method, multiple databases can be accessed within a single application. We are only concerned about the first part of the name, before the first underscore '_', all other underscores are ignored.

If the class file can't be located, than a dummy class is created and an Exception is thrown.

author: Walter Torres <walter@torres.ws>
access: public
uses: MODEL - path to Application Model Class files
uses: Exception
void model_loader (string $_className)
  • string $_className: Class to load

Documentation generated on Tue, 18 Aug 2009 02:30:11 -0500 by phpDocumentor 1.4.2