PHP Class Modules, TastyIgniter

Inheritance: extends Eloquent
Show file Open project: tastyigniter/tastyigniter Class Usage Examples

Public Properties

Property Type Description
$locations
$registry
$routes

Public Methods

Method Description
autoload ( $class ) Library base class autoload *
file_path ( $module = null, $folder = null, $file = null ) : string Find the path to a module's file.
files ( $module_name = NULL, $module_folder = NULL ) : array Return an associative array of files within one or more modules.
find ( $file, $module, $base ) Find a file Scans for files located within modules directories.
folders ( ) : array Returns an array of the folders in which modules may be stored.
list_modules ( ) : array Returns a list of all modules in the system.
load ( $module ) Load a module controller *
load_file ( $file, $path, $type = 'other', $result = TRUE ) Load a module file *
parse_routes ( $module, $uri ) Parse module routes *
path ( $module = null, $folder = null ) : string Return the path to the module and its specified folder.
run ( $module ) Run a module controller method Output from module is buffered and returned.

Method Details

autoload() public static method

Library base class autoload *
public static autoload ( $class )

file_path() public static method

Find the path to a module's file.
public static file_path ( $module = null, $folder = null, $file = null ) : string
$module string The name of the module to find.
$folder string The folder within the module to search for the file (ie. controllers).
$file string The name of the file to search for.
return string The full path to the file.

files() public static method

Return an associative array of files within one or more modules.
public static files ( $module_name = NULL, $module_folder = NULL ) : array
$module_name string If not null, will return only files from that module.
$module_folder string If not null, will return only files within that sub-folder of each module (ie 'views').
return array An associative array, like: array( 'module_name' => array( 'folder' => array('file1', 'file2') ) )

find() public static method

Also scans application directories for models, plugins and views. Generates fatal error if file not found.
public static find ( $file, $module, $base )

folders() public static method

Returns an array of the folders in which modules may be stored.
public static folders ( ) : array
return array The folders in which modules may be stored.

list_modules() public static method

Returns a list of all modules in the system.
public static list_modules ( ) : array
return array A list of all modules in the system.

load() public static method

Load a module controller *
public static load ( $module )

load_file() public static method

Load a module file *
public static load_file ( $file, $path, $type = 'other', $result = TRUE )

parse_routes() public static method

Parse module routes *
public static parse_routes ( $module, $uri )

path() public static method

Return the path to the module and its specified folder.
public static path ( $module = null, $folder = null ) : string
$module string The name of the module (must match the folder name).
$folder string The folder name to search for (Optional).
return string The path, relative to the front controller.

run() public static method

Run a module controller method Output from module is buffered and returned.
public static run ( $module )

Property Details

$locations public static property

public static $locations

$registry public static property

public static $registry

$routes public static property

public static $routes