Orion PHP  0.11.12
The PHP5.3 framework
Orion Class Reference

List of all members.

Public Member Functions

 __construct ($path='orion/')
 configure ($filename)
 run ()

Static Public Member Functions

static autoload ($classname)
static parseClassName ($name)
static base ()
static & config ()
static & module ()
static setMode ($mode)
static getMode ()
static debug ()
static isDebug ()

Public Attributes

const BASE_NS = '\\Orion\\'
const CONF_NS = '\\Orion\\Configs\\'
const MODULE_NS = '\\Orion\\Modules\\'
const PLUGIN_NS = '\\Orion\\Plugins\\'
const MODEL_NS = '\\Orion\\Models\\'
const CLASS_BASE = 'Orion'
const CORE_PATH = 'core/'
const CONF_PATH = 'configs/'
const LIBS_PATH = 'libs/'
const MODEL_PATH = 'models/'
const MODULE_PATH = 'modules/'
const PLUGIN_PATH = 'plugins/'
const RENDERER_PATH = 'renderers/'
const MODEL_EXT = '.model'
const TEMPLATE_EXT = '.tpl'
const VIEW_EXT = '.view'
const MODE_DEFAULT = 'default'

Static Private Attributes

static $DEBUG = false
static $CONFIG = null
static $MODULE = null
static $BASE
static $MODE = 'default'

Detailed Description

Orion main class. Makes everything work together

Usage : $o = new Orion(); $o->configure('main'); $o->run();

Copyright (c) 2010-2012, Thibaut Despoulain All rights reserved. http://orion.bkcore.com/

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the <organization>. 4. Neither the name of the <organization> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Author:
Thibaut Despoulain

Definition at line 51 of file orion.php.


Constructor & Destructor Documentation

Orion::__construct ( path = 'orion/')

Start the Orion instance.
Register Orion's spl_autoload.

Parameters:
string$pathPath to Orion's main directory. ('orion/' by default)
With the trailing slash but without the first.

Definition at line 142 of file orion.php.


Member Function Documentation

static Orion::autoload ( classname) [static]

Autoloader for Orion's core classes

Parameters:
string$classname

Definition at line 202 of file orion.php.

static Orion::base ( ) [static]
Returns:
string orion's base dir with the trailing slash. ex: orion/

Definition at line 242 of file orion.php.

static& Orion::config ( ) [static]

Config class accessor

Returns:
Orion

Definition at line 251 of file orion.php.

Orion::configure ( filename)

Load and init a new OrionConfig instance, linking it to Orion.

Parameters:
string$filenameThe configuration file to use (No path, no extension, just the name).

Definition at line 153 of file orion.php.

static Orion::debug ( ) [static]

Definition at line 285 of file orion.php.

static Orion::getMode ( ) [static]

Get Orion's mode ('default'|'admin'). You can use Orion::MODE_DEFAULT or Orion::MODE_ADMIN constants.

Returns:
string Mode

Definition at line 280 of file orion.php.

static Orion::isDebug ( ) [static]

Definition at line 290 of file orion.php.

static& Orion::module ( ) [static]

Current module accessor

Returns:
Orion

Definition at line 260 of file orion.php.

static Orion::parseClassName ( name) [static]

Parse a class name and transform it into its corresponding path

Parameters:
string$nameof the class

Definition at line 223 of file orion.php.

Orion::run ( )

Run everything, launch module, etc.

Definition at line 174 of file orion.php.

static Orion::setMode ( mode) [static]

Set Orion's mode ('main'|'admin'). You can use Orion::MODE_DEFAULT or Orion::MODE_ADMIN constants.

Modes are used to determinate which menu and context to use Default mode is 'default'

Parameters:
stringMode

Definition at line 271 of file orion.php.


Member Data Documentation

Orion::$BASE [static, private]

Definition at line 129 of file orion.php.

Orion::$CONFIG = null [static, private]

Definition at line 117 of file orion.php.

Orion::$DEBUG = false [static, private]

Definition at line 111 of file orion.php.

Orion::$MODE = 'default' [static, private]

Definition at line 135 of file orion.php.

Orion::$MODULE = null [static, private]

Definition at line 123 of file orion.php.

const Orion::BASE_NS = '\\Orion\\'

Definition at line 53 of file orion.php.

Class base

Definition at line 61 of file orion.php.

const Orion::CONF_NS = '\\Orion\\Configs\\'

Definition at line 54 of file orion.php.

const Orion::CONF_PATH = 'configs/'

Relative path to Orion's configuration files

Definition at line 69 of file orion.php.

const Orion::CORE_PATH = 'core/'

Relative path to Orion's core classes

Definition at line 65 of file orion.php.

const Orion::LIBS_PATH = 'libs/'

Reslative path to Orion's third-party libs

Definition at line 73 of file orion.php.

const Orion::MODE_DEFAULT = 'default'

Default mode

Definition at line 105 of file orion.php.

const Orion::MODEL_EXT = '.model'

Orion's local model extension

Definition at line 93 of file orion.php.

const Orion::MODEL_NS = '\\Orion\\Models\\'

Definition at line 57 of file orion.php.

const Orion::MODEL_PATH = 'models/'

Relative path to Orion's global models

Definition at line 77 of file orion.php.

const Orion::MODULE_NS = '\\Orion\\Modules\\'

Definition at line 55 of file orion.php.

const Orion::MODULE_PATH = 'modules/'

Relative path to Orion's modules

Definition at line 81 of file orion.php.

const Orion::PLUGIN_NS = '\\Orion\\Plugins\\'

Definition at line 56 of file orion.php.

const Orion::PLUGIN_PATH = 'plugins/'

Relative path to Orion's plugins

Definition at line 85 of file orion.php.

const Orion::RENDERER_PATH = 'renderers/'

Relative path to Orion's renderers

Definition at line 89 of file orion.php.

const Orion::TEMPLATE_EXT = '.tpl'

Orion's template extension

Definition at line 97 of file orion.php.

const Orion::VIEW_EXT = '.view'

Orion's view extension

Definition at line 101 of file orion.php.


The documentation for this class was generated from the following file: