Свойство | Тип | Описание | |
---|---|---|---|
$_ci_autoload_libraries | 当前 Module 的控制器名 | ||
$_ci_autoload_models | 自动装载的类库名数组 | ||
$_ci_is_inside_module | |||
$_ci_module_class | 当前 Module 所在路径 | ||
$_ci_module_method | 当前 Module 的调用 URI | ||
$_ci_module_models | 当前 Module 执行的方法 | ||
$_ci_module_path | 当前是否是 Module 里的 Loader | ||
$_ci_module_uri | 自动装载的模型名数组 |
Метод | Описание | |
---|---|---|
__construct ( ) | Constructor | |
_ci_module_ready ( $class_path, $class_name ) | Module 中的 Loader 类实例初始化时,自动调用此函数 | |
config ( string $file, boolean $use_sections = FALSE, boolean $fail_gracefully = FALSE ) : boolean | Config Loader | |
database ( mixed $params = '', boolean $return = FALSE, boolean $query_builder = NULL ) : object | boolean | Database Loader | |
dbforge ( object $db = NULL, boolean $return = FALSE ) : object | Load the Database Forge Class | |
dbutil ( object $db = NULL, boolean $return = FALSE ) : object | Load the Database Utilities Class | |
get_base_classes ( ) | 获取 _base_classes 属性 | |
language ( string | string[] $files, $lang = '' ) : object | Language Loader | |
model ( string $model, string $name = '', boolean $db_conn = FALSE ) : object | Model Loader | |
module ( $module_uri, $vars = [], $return = FALSE ) : void | Module Loader | |
module_url ( $uri, $controller_name = '' ) : string | 取当前 Module 某方法的 URL 地址 | |
view ( string $view, array $vars = [], boolean $return = FALSE ) : object | string | View Loader |
Метод | Описание | |
---|---|---|
_ci_get_component ( string $component ) : boolean | CI Component getter | |
_ci_init_library ( string $class, string $prefix, array | null | boolean $config = FALSE, string $object_name = NULL ) : void | Internal CI Library Instantiator | |
_ci_load ( array $_ci_data ) : object | Internal CI Data Loader | |
_ci_load_library ( string $class, mixed $params = NULL, string $object_name = NULL ) : void | Internal CI Library Loader | |
_ci_load_stock_library ( $library_name, string $file_path, mixed $params, string $object_name ) : void | Internal CI Stock Library Loader |
Метод | Описание | |
---|---|---|
get_instance ( ) | 根据是否在模块中来取超级对象 |
public __construct ( ) |
protected _ci_get_component ( string $component ) : boolean | ||
$component | string | Component name |
Результат | boolean |
protected _ci_init_library ( string $class, string $prefix, array | null | boolean $config = FALSE, string $object_name = NULL ) : void | ||
$class | string | Class name |
$prefix | string | Class name prefix |
$config | array | null | boolean | Optional configuration to pass to the class constructor: FALSE to skip; NULL to search in config paths; array containing configuration data |
$object_name | string | Optional object name to assign to |
Результат | void |
protected _ci_load_stock_library ( $library_name, string $file_path, mixed $params, string $object_name ) : void | ||
$file_path | string | Path to the library filename, relative to libraries/ |
$params | mixed | Optional parameters to pass to the class constructor |
$object_name | string | Optional object name to assign to |
Результат | void |
public _ci_module_ready ( $class_path, $class_name ) |
public config ( string $file, boolean $use_sections = FALSE, boolean $fail_gracefully = FALSE ) : boolean | ||
$file | string | Configuration file name |
$use_sections | boolean | Whether configuration values should be loaded into their own section |
$fail_gracefully | boolean | Whether to just return FALSE or display an error message |
Результат | boolean | TRUE if the file was loaded correctly or FALSE on failure |
public database ( mixed $params = '', boolean $return = FALSE, boolean $query_builder = NULL ) : object | boolean | ||
$params | mixed | Database configuration options |
$return | boolean | Whether to return the database object |
$query_builder | boolean | Whether to enable Query Builder (overrides the configuration setting) |
Результат | object | boolean | Database object if $return is set to TRUE, FALSE on failure, CI_Loader instance in any other case |
public module_url ( $uri, $controller_name = '' ) : string | ||
Результат | string |