ADDON_PATH
ADDON_PATH = ROOT_PATH . 'addons' . DS
Acme |
addons |
app |
Composer |
Cron |
Doctrine |
EasyWeChat |
Endroid |
fast |
GatewayWorker |
GuzzleHttp |
League |
Monolog |
Overtrue |
Pimple |
Psr |
Symfony |
think |
traits |
Workerman |
ProviderTrait |
PHPExcel_CachedObjectStorage_ICache | PHPExcel_CachedObjectStorage_ICache |
PHPExcel_Cell_IValueBinder | PHPExcel_Cell_IValueBinder |
PHPExcel_IComparable | PHPExcel_IComparable |
PHPExcel_Reader_IReader | PHPExcel_Reader_IReader |
PHPExcel_Reader_IReadFilter | PHPExcel_Reader_IReadFilter |
PHPExcel_RichText_ITextElement | PHPExcel_RichText_ITextElement |
PHPExcel_Writer_IWriter | PHPExcel_Writer_IWriter |
SessionUpdateTimestampHandlerInterface |
abort(integer|\think\Response $code, string $message = null, array $header = array())
抛出HTTP异常
integer|\think\Response | $code | 状态码 或者 Response对象实例 |
string | $message | 错误信息 |
array | $header | 参数 |
captcha(string $id = "", array $config = array()) : \think\Response
string | $id | |
array | $config |
classnames()
css样式名生成器 classnames("foo", "bar"); // => "foo bar" classnames("foo", [ "bar"=> true ]); // => "foo bar" classnames([ "foo-bar"=> true ]); // => "foo-bar" classnames([ "foo-bar"=> false ]); // => " classnames([ "foo" => true ], [ "bar"=> true ]); // => "foo bar" classnames([ "foo" => true, "bar"=> true ]); // => "foo bar" classnames("foo", [ "bar"=> true, "duck"=> false ], "baz", [ "quux"=> true ]); // => "foo bar baz quux" classnames(null, false, "bar", 0, 1, [ "baz"=> null ]); // => "bar 1"
collection(array $resultSet) : \think\model\Collection|\think\Collection
数组转换为数据集对象
array | $resultSet | 数据集数组 |
controller(string $name, string $layer = 'controller', boolean $appendSuffix = false) : \think\Controller
实例化控制器 格式:[模块/]控制器
string | $name | 资源地址 |
string | $layer | 控制层名称 |
boolean | $appendSuffix | 是否添加类名后缀 |
db(string $name = '', array|string $config = array(), boolean $force = false) : \think\db\Query
实例化数据库类
string | $name | 操作的数据表名称(不含前缀) |
array|string | $config | 数据库配置参数 |
boolean | $force | 是否强制重新连接 |
json(mixed $data = array(), integer $code = 200, array $header = array(), array $options = array()) : \think\response\Json
获取\think\response\Json对象实例
mixed | $data | 返回的数据 |
integer | $code | 状态码 |
array | $header | 头部 |
array | $options | 参数 |
jsonp(mixed $data = array(), integer $code = 200, array $header = array(), array $options = array()) : \think\response\Jsonp
获取\think\response\Jsonp对象实例
mixed | $data | 返回的数据 |
integer | $code | 状态码 |
array | $header | 头部 |
array | $options | 参数 |