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 | 参数 | 
model(string $name = '', string $layer = 'model', boolean $appendSuffix = false) : \think\Model
实例化Model
| string | $name | Model名称 | 
| string | $layer | 业务层名称 | 
| boolean | $appendSuffix | 是否添加类名后缀 | 
redirect(mixed $url = array(), array|integer $params = array(), integer $code = 302, array $with = array()) : \think\response\Redirect
获取\think\response\Redirect对象实例
| mixed | $url | 重定向地址 支持Url::build方法的地址 | 
| array|integer | $params | 额外参数 | 
| integer | $code | 状态码 | 
| array | $with | 隐式传参 | 
request() : \think\Request
获取当前Request对象实例
response(mixed $data = array(), integer|string $code = 200, array $header = array(), string $type = 'html') : \think\Response
创建普通 Response 对象实例
| mixed | $data | 输出数据 | 
| integer|string | $code | 状态码 | 
| array | $header | 头信息 | 
| string | $type | 
tln_deent(string $attvalue, string $regex, boolean $hex = false) : boolean
Translates entities into literal values so they can be checked.
| string | $attvalue | the by-ref value to check. | 
| string | $regex | the regular expression to check against. | 
| boolean | $hex | whether the entities are hexadecimal. | 
True or False depending on whether there were matches.
tln_findnxreg(string $body, integer $offset, string $reg) : array|boolean
This function takes a PCRE-style regexp and tries to match it within the string.
| string | $body | The string to look for needle in. | 
| integer | $offset | Start looking from here. | 
| string | $reg | A PCRE-style regex to match. | 
Returns a false if no matches found, or an array with the following members:
tln_findnxstr(string $body, integer $offset, string $needle) : integer
This function looks for the next character within a string. It's really just a glorified "strpos", except it catches the failures nicely.
| string | $body | The string to look for needle in. | 
| integer | $offset | Start looking from this position. | 
| string | $needle | The character/string to look for. | 
location of the next occurrence of the needle, or strlen($body) if needle wasn't found.
tln_fixatts(string $tagname, array $attary, array $rm_attnames, array $bad_attvals, array $add_attr_to_tag, string $trans_image_path, boolean $block_external_images) : array
This function runs various checks against the attributes.
| string | $tagname | String with the name of the tag. | 
| array | $attary | Array with all tag attributes. | 
| array | $rm_attnames | See description for tln_sanitize | 
| array | $bad_attvals | See description for tln_sanitize | 
| array | $add_attr_to_tag | See description for tln_sanitize | 
| string | $trans_image_path | |
| boolean | $block_external_images | 
with modified attributes.
tln_getnxtag(string $body, integer $offset) : array|boolean
This function looks for the next tag.
| string | $body | String where to look for the next tag. | 
| integer | $offset | Start looking from here. | 
false if no more tags exist in the body, or an array with the following members:
tln_sanitize(string $body, array $tag_list, array $rm_tags_with_content, array $self_closing_tags, boolean $force_tag_closing, array $rm_attnames, array $bad_attvals, array $add_attr_to_tag, string $trans_image_path, boolean $block_external_images) : string
| string | $body | The HTML you wish to filter | 
| array | $tag_list | see description above | 
| array | $rm_tags_with_content | see description above | 
| array | $self_closing_tags | see description above | 
| boolean | $force_tag_closing | see description above | 
| array | $rm_attnames | see description above | 
| array | $bad_attvals | see description above | 
| array | $add_attr_to_tag | see description above | 
| string | $trans_image_path | |
| boolean | $block_external_images | 
Sanitized html safe to show on your pages.
tln_skipspace(string $body, integer $offset) : integer
This function skips any whitespace from the current position within a string and to the next non-whitespace value.
| string | $body | the string | 
| integer | $offset | the offset within the string where we should start looking for the next non-whitespace character. | 
the location within the $body where the next non-whitespace char is located.
tln_tagprint(string $tagname, array $attary, integer $tagtype) : string
This function returns the final tag out of the tag name, an array of attributes, and the type of the tag. This function is called by tln_sanitize internally.
| string | $tagname | the name of the tag. | 
| array | $attary | the array of attributes and their values | 
| integer | $tagtype | The type of the tag (see in comments). | 
A string with the final tag representation.
tln_unspace(string  $attvalue) 
                Kill any tabs, newlines, or carriage returns. Our friends the makers of the browser with 95% market value decided that it'd be funny to make "java[tab]script" be just as good as "javascript".
| string | $attvalue | The attribute value before extraneous spaces removed. | 
validate(string $name = '', string $layer = 'validate', boolean $appendSuffix = false) : \think\Validate
实例化验证器
| string | $name | 验证器名称 | 
| string | $layer | 业务层名称 | 
| boolean | $appendSuffix | 是否添加类名后缀 | 
view(string $template = '', array $vars = array(), array $replace = array(), integer $code = 200) : \think\response\View
渲染模板输出
| string | $template | 模板文件 | 
| array | $vars | 模板变量 | 
| array | $replace | 模板替换 | 
| integer | $code | 状态码 | 
xml(mixed $data = array(), integer $code = 200, array $header = array(), array $options = array()) : \think\response\Xml
获取\think\response\Xml对象实例
| mixed | $data | 返回的数据 | 
| integer | $code | 状态码 | 
| array | $header | 头部 | 
| array | $options | 参数 |