Public Member Functions | Data Fields | Protected Member Functions
Dispersion Class Reference

Base for core classes and libraries within the framework. More...

Inheritance diagram for Dispersion:
Controller DataBaseMySql FileUpload Pagination Session Template Model

Public Member Functions

 Dispersion ()
 
 emptyLayout ()
 
 set ($name, $value)
 
 _set ($name, $value)
 
 insertView ($name, $index=-1)
 

Data Fields

 $model_ob = null
 
 $debug_ob = null
 
 $_variables = array()
 
 $_content = array()
 
 $_content_count = 0
 
 $model
 
 $debug
 

Protected Member Functions

 requireConfigFile ($file_name, $required=false)
 

Detailed Description

Base for core classes and libraries within the framework.

Version
1.1
Author
DinuSV

Extending this class offers access to the data model, debug object, all autoloaded libraries and the ability to manipulate views. Extension should mainly be done by custom libraries that require this access. Internally, the framework extends this class for data accessors, some libraries and core components.

Member Function Documentation

Constructor

emptyLayout ( )

Empty the standard layout

set (   $name,
  $value 
)

Set variables for the view files

Parameters
string$name: name of the variable
string$value: value of the variable
_set (   $name,
  $value 
)

Different name for the set method in case the name is needed for a controller action

See Also
'set' method
insertView (   $name,
  $index = -1 
)

Add content

Parameters
string$name: name of the view file
numeric$index: (optional)add the view file at the specified position
Exceptions
IndexOutOfBoundsException
requireConfigFile (   $file_name,
  $required = false 
)
protected

Require a configuration file. Used by libraries which require configuration.

Parameters
string$file_name: the name of the file
boolean$required: true if the file is needed, false if the file is optional
Exceptions
FileNotFoundException
Returns
boolean : true if the file was found and included, false otherwise

Field Documentation

$model_ob = null

Model : object to be initialised by inheriting classes

$debug_ob = null

Debug : Debug object to be initialised by inheriting classes

$_variables = array()

array : Stores the variables that will be made available to the view files

$_content = array()

array : Stores the view files

$_content_count = 0

int : Keeps track of the number of view files added

$model

Model : Current model

$debug

Debug : Current debug object