[ 查看开发文档 ] [ 类树图: default ] [ 索引: default ] [ 所有元素 ] [ 首页 ]

Class: Loader

源文件路径: /base.php

Class Overview


系统加载器


Methods


Inherited Variables

Inherited Methods


Class Details

[line 132]
系统加载器


[ Top ]


Method Detail

app   [line 141]

\Library\Application app( [object $request = null], [object $response = null])

加载并运行应用程序对象
  • Return: 应用程序对象
  • Access: public

Parameters:

object   $request   —  外部Request对象(可选)
object   $response   —  外部Response对象(可选)

[ Top ]

config   [line 278]

mixed config( string|array $name, [string $key = ''], [string $default = ''])

配置文件加载
  • Access: public

Parameters:

string|array   $name   —  配置文件名称(不包括扩展名),如果为数组则设置配置选项
string   $key   —  要获取的配置键值
string   $default   —  默认配置,当获取配置项目失败时该值发生作用

[ Top ]

controller   [line 205]

\Library\Controller controller( string $name, [array $parameters = []], [\Library\Container $container = null])

控制器加载
  • Access: public

Parameters:

string   $name   —  控制器名称(可以指定模块,以“.”分割:“模块名.控制器”)
array   $parameters   —  参数列表
\Library\Container   $container   —  使用的容器对象

[ Top ]

env   [line 154]

mixed env( [string $key = null], [string $value = null], [string $default = null])

系统环境变量加载
  • Access: public

Parameters:

string   $key   —  环境变量键名,如果为null则重写设置日志
string   $value   —  环境变量键值
string   $default   —  默认值

[ Top ]

helper   [line 242]

boolean helper( $name, [ $module = null], string $func, string|mixed $moudule)

函数库加载
  • Access: public

Parameters:

string   $func   —  函数库名
string|mixed   $moudule   —  当是字符串为模型名称,如果是true,则为当前模型
   $name   — 
   $module   — 

[ Top ]

import   [line 175]

string import( string $path)

系统类加载
  • Access: public

Parameters:

string   $path   —  类路径

[ Top ]


Powered by Steeze. author email: spring.wind2006@163.com