|
| __construct () |
|
| initialize () |
|
| is_loaded ($class) |
|
| library ($library= '', $params=NULL, $object_name=NULL) |
|
| model ($model, $name= '', $db_conn=FALSE) |
|
| database ($params= '', $return=FALSE, $active_record=NULL) |
|
| dbutil () |
|
| dbforge () |
|
| view ($view, $vars=array(), $return=FALSE) |
|
| file ($path, $return=FALSE) |
|
| vars ($vars=array(), $val= '') |
|
| get_var ($key) |
|
| helper ($helpers=array()) |
|
| helpers ($helpers=array()) |
|
| language ($file=array(), $lang= '') |
|
| config ($file= '', $use_sections=FALSE, $fail_gracefully=FALSE) |
|
| driver ($library= '', $params=NULL, $object_name=NULL) |
|
| add_package_path ($path, $view_cascade=TRUE) |
|
| get_package_paths ($include_base=FALSE) |
|
| remove_package_path ($path= '', $remove_config_path=TRUE) |
|
|
| $_ci_ob_level |
|
| $_ci_view_paths = array() |
|
| $_ci_library_paths = array() |
|
| $_ci_model_paths = array() |
|
| $_ci_helper_paths = array() |
|
| $_base_classes = array() |
|
| $_ci_cached_vars = array() |
|
| $_ci_classes = array() |
|
| $_ci_loaded_files = array() |
|
| $_ci_models = array() |
|
| $_ci_helpers = array() |
|
| $_ci_varmap |
|
Constructor
Sets the path to the view files and gets the initial output buffering level
& _ci_get_component |
( |
|
$component) | |
|
|
protected |
Get a reference to a specific library or model
- Parameters
-
- Returns
- bool
_ci_init_class |
( |
|
$class, |
|
|
|
$prefix = '' , |
|
|
|
$config = FALSE , |
|
|
|
$object_name = NULL |
|
) |
| |
|
protected |
Instantiates a class
- Parameters
-
string | |
string | |
bool | |
string | an optional object name |
- Returns
- null
Loader
This function is used to load views and files. Variables are prefixed with ci to avoid symbol collision with variables made available to view files
- Parameters
-
- Returns
- void
_ci_load_class |
( |
|
$class, |
|
|
|
$params = NULL , |
|
|
|
$object_name = NULL |
|
) |
| |
|
protected |
Load class
This function loads the requested class.
- Parameters
-
string | the item that is being loaded |
mixed | any additional parameters |
string | an optional object name |
- Returns
- void
_ci_object_to_array |
( |
|
$object) | |
|
|
protected |
Object to Array
Takes an object as input and converts the class variables to array key/vals
- Parameters
-
- Returns
- array
_ci_prep_filename |
( |
|
$filename, |
|
|
|
$extension |
|
) |
| |
|
protected |
Prep filename
This function preps the name of various items to make loading them more reliable.
- Parameters
-
- Returns
- array
add_package_path |
( |
|
$path, |
|
|
|
$view_cascade = TRUE |
|
) |
| |
Add Package Path
Prepends a parent path to the library, model, helper, and config path arrays
- Parameters
-
- Returns
- void
config |
( |
|
$file = '' , |
|
|
|
$use_sections = FALSE , |
|
|
|
$fail_gracefully = FALSE |
|
) |
| |
Loads a config file
- Parameters
-
- Returns
- void
database |
( |
|
$params = '' , |
|
|
|
$return = FALSE , |
|
|
|
$active_record = NULL |
|
) |
| |
Database Loader
- Parameters
-
string | the DB credentials |
bool | whether to return the DB object |
bool | whether to enable active record (this allows us to override the config setting) |
- Returns
- object
Load the Database Forge Class
- Returns
- string
Load the Utilities Class
- Returns
- string
driver |
( |
|
$library = '' , |
|
|
|
$params = NULL , |
|
|
|
$object_name = NULL |
|
) |
| |
Driver
Loads a driver library
- Parameters
-
string | the name of the class |
mixed | the optional parameters |
string | an optional object name |
- Returns
- void
file |
( |
|
$path, |
|
|
|
$return = FALSE |
|
) |
| |
Load File
This is a generic file loader
- Parameters
-
- Returns
- string
get_package_paths |
( |
|
$include_base = FALSE ) | |
|
Get Package Paths
Return a list of all package paths, by default it will ignore BASEPATH.
- Parameters
-
- Returns
- void
Get Variable
Check if a variable is set and retrieve it.
- Parameters
-
- Returns
- void
helper |
( |
|
$helpers = array() ) | |
|
Load Helper
This function loads the specified helper file.
- Parameters
-
- Returns
- void
helpers |
( |
|
$helpers = array() ) | |
|
Load Helpers
This is simply an alias to the above function in case the user has written the plural form of this function.
- Parameters
-
- Returns
- void
Initialize the Loader
This method is called once in CI_Controller.
- Parameters
-
- Returns
- object
Is Loaded
A utility function to test if a class is in the self::$_ci_classes array. This function returns the object name if the class tested for is loaded, and returns FALSE if it isn't.
It is mainly used in the form_helper -> _get_validation_object()
- Parameters
-
string | class being checked for |
- Returns
- mixed class object name on the CI SuperObject or FALSE
language |
( |
|
$file = array() , |
|
|
|
$lang = '' |
|
) |
| |
Loads a language file
- Parameters
-
- Returns
- void
library |
( |
|
$library = '' , |
|
|
|
$params = NULL , |
|
|
|
$object_name = NULL |
|
) |
| |
Class Loader
This function lets users load and instantiate classes. It is designed to be called from a user's app controllers.
- Parameters
-
string | the name of the class |
mixed | the optional parameters |
string | an optional object name |
- Returns
- void
model |
( |
|
$model, |
|
|
|
$name = '' , |
|
|
|
$db_conn = FALSE |
|
) |
| |
Model Loader
This function lets users load and instantiate models.
- Parameters
-
string | the name of the class |
string | name for the model |
bool | database connection |
- Returns
- void
remove_package_path |
( |
|
$path = '' , |
|
|
|
$remove_config_path = TRUE |
|
) |
| |
Remove Package Path
Remove a path from the library, model, and helper path arrays if it exists If no path is provided, the most recently added path is removed.
- Parameters
-
- Returns
- type
vars |
( |
|
$vars = array() , |
|
|
|
$val = '' |
|
) |
| |
Set Variables
Once variables are set they become available within the controller class and its "view" files.
- Parameters
-
- Returns
- void
view |
( |
|
$view, |
|
|
|
$vars = array() , |
|
|
|
$return = FALSE |
|
) |
| |
Load View
This function is used to load a "view" file. It has three parameters:
- The name of the "view" file to be included.
- An associative array of data to be extracted for use in the view.
- TRUE/FALSE - whether to return the data or load it. In some cases it's advantageous to be able to return data so that a developer can process it in some way.
- Parameters
-
- Returns
- void
Initial value:= array('unit_test' => 'unit',
'user_agent' => 'agent')
The documentation for this class was generated from the following file: