forked from yangweijie/SublimeThinkPHP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphp.sublime-completions
More file actions
265 lines (264 loc) · 11.4 KB
/
php.sublime-completions
File metadata and controls
265 lines (264 loc) · 11.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
{
"scope": "source.php - variable.other.php",
"completions":
[
//预定义常量
"URL_COMMON",
"URL_PATHINFO",
"URL_REWRITE",
"URL_REWRITE",
"URL_COMPAT",
"HAS_ONE",
"BELONGS_TO",
"HAS_MANY",
"MANY_TO_MANY",
"THINK_VERSION",
//路径常量
"CORE_PATH",
"EXTEND_PATH",
"MODE_PATH",
"ENGINE_PATH",
"VENDOR_PATH",
"LIBRARY_PATH",
"COMMON_PATH",
"LIB_PATH",
"RUNTIME_PATH",
"CONF_PATH",
"LOG_PATH",
"CACHE_PATH",
"LANG_PATH",
"TEMP_PATH",
"DATA_PATH",
"TMPL_PATH",
"HTML_PATH",
//系统常量
"IS_CGI",
"IS_WIN",
"IS_CLI",
"__ROOT__",
"__APP__",
"__GROUP__",
"__URL__",
"__ACTION__",
"__SELF__",
"__INFO__",
"APP_NAME",
"GROUP_NAME",
"MODULE_NAME",
"ACTION_NAME",
"APP_DEBUG",
"MODE_NAME",
"APP_PATH",
"THINK_PATH",
"MEMORY_LIMIT_ON",
"RUNTIME_FILE",
"THEME_NAME",
"THEME_PATH",
"APP_TMPL_PATH",
"LANG_SET",
"MAGIC_QUOTES_GPC",
"APP_STATUS",
//项目中C函数默认获取到的所有配置键名
"APP_FILE_CASE",
"APP_AUTOLOAD_PATH",
"APP_TAGS_ON",
"APP_SUB_DOMAIN_DEPLOY",
"APP_SUB_DOMAIN_RULES",
"APP_SUB_DOMAIN_DENY",
"APP_GROUP_LIST",
"APP_GROUP_MODE",
"APP_GROUP_PATH",
"ACTION_SUFFIX",
"COOKIE_EXPIRE",
"COOKIE_DOMAIN",
"COOKIE_PATH",
"COOKIE_PREFIX",
"DEFAULT_M_LAYER",
"DEFAULT_C_LAYER",
"DEFAULT_APP",
"DEFAULT_LANG",
"DEFAULT_THEME",
"DEFAULT_GROUP",
"DEFAULT_MODULE",
"DEFAULT_ACTION",
"DEFAULT_CHARSET",
"DEFAULT_TIMEZONE",
"DEFAULT_AJAX_RETURN",
"DEFAULT_JSONP_HANDLER",
"DEFAULT_FILTER",
"DB_TYPE",
"DB_HOST",
"DB_NAME",
"DB_USER",
"DB_PWD",
"DB_PORT",
"DB_PREFIX",
"DB_FIELDTYPE_CHECK",
"DB_FIELDS_CACHE",
"DB_CHARSET",
"DB_DEPLOY_TYPE",
"DB_RW_SEPARATE",
"DB_MASTER_NUM",
"DB_SLAVE_NO",
"DB_SQL_BUILD_CACHE",
"DB_SQL_BUILD_QUEUE",
"DB_SQL_BUILD_LENGTH",
"DB_SQL_LOG",
"DATA_CACHE_TIME",
"DATA_CACHE_COMPRESS",
"DATA_CACHE_CHECK",
"DATA_CACHE_PREFIX",
"DATA_CACHE_TYPE",
"DATA_CACHE_PATH",
"DATA_CACHE_SUBDIR",
"DATA_PATH_LEVEL",
"ERROR_MESSAGE",
"ERROR_PAGE",
"SHOW_ERROR_MSG",
"TRACE_EXCEPTION",
"LOG_RECORD",
"LOG_TYPE",
"LOG_DEST",
"LOG_EXTRA",
"LOG_LEVEL",
"LOG_FILE_SIZE",
"LOG_EXCEPTION_RECORD",
"SESSION_AUTO_START",
"SESSION_OPTIONS",
"SESSION_TYPE",
"SESSION_PREFIX",
"TMPL_CONTENT_TYPE",
"TMPL_ACTION_ERROR",
"TMPL_ACTION_SUCCESS",
"TMPL_EXCEPTION_FILE",
"TMPL_DETECT_THEME",
"TMPL_TEMPLATE_SUFFIX",
"TMPL_FILE_DEPR",
"URL_CASE_INSENSITIVE",
"URL_MODEL",
"URL_PATHINFO_DEPR",
"URL_PATHINFO_FETCH",
"URL_HTML_SUFFIX",
"URL_PARAMS_BIND",
"URL_404_REDIRECT",
"VAR_GROUP",
"VAR_MODULE",
"VAR_ACTION",
"VAR_AJAX_SUBMIT",
"VAR_JSONP_HANDLER",
"VAR_PAGE",
"VAR_PATHINFO",
"VAR_URL_PARAMS",
"VAR_TEMPLATE",
"VAR_FILTERS",
"OUTPUT_ENCODE",
"HTTP_CACHE_CONTROL",
"SHOW_PAGE_TRACE",
"EXTENDS",
"TMPL_CACHE_ON",
"TMPL_STRIP_SPACE",
"CACHE_PATH",
"HTML_CACHE_ON",
"HTML_CACHE_TIME",
"HTML_CACHE_RULES",
"HTML_FILE_SUFFIX",
"TEMPLATE_NAME",
{ "trigger": "_ad", "contents": "protected function _after_delete(\\$data,\\$options) {\n ${1:}\n}$0" },
{ "trigger": "_af", "contents": "protected function _after_find(&\\$result,\\$options) {\n ${1:}\n}$0" },
{ "trigger": "_ai", "contents": "protected function _after_insert(\\$data,\\$options) {\n ${1:}\n}$0" },
{ "trigger": "_as", "contents": "protected function _after_select(&\\$result,\\$options){\n ${1:foreach(\\$result as &\\$record)\\{\n ${2:\\$this->_after_find(\\$record,\\$options);}\n \\}}\n}$0" },
{ "trigger": "_au", "contents": "protected function _after_update(\\$data,\\$options) {\n ${1:}\n}$0" },
{ "trigger": "_bi", "contents": "protected function _before_insert(&\\$data,\\$options) {\n ${1:}\n}$0" },
{ "trigger": "_bu", "contents": "protected function _before_update(&\\$data,\\$options) {\n ${1:}\n}$0" },
{ "trigger": "->_empty", "contents": "\\$this->_empty()$0" },
{ "trigger": "_get", "contents": "_get('${1:\\$name}')$0" },
{ "trigger": "_post", "contents": "_post('${1:\\$name}')$0" },
{ "trigger": "->_sql", "contents": "->_sql('${1:\\$name}')$0" },
{ "trigger": "->addAll", "contents": "->addAll(\\$${1:dataList},\\$${2:options},\\$${3:replace})$0" },
{ "trigger": "->ajaxReturn", "contents": "->ajaxReturn(${1:\\$data},${2:\\$info},${3:\\$status},${4:\\$type})$0" },
{ "trigger": "->alias", "contents": "->alias('${1:}')$0" },
{ "trigger": "->assign", "contents": "->assign('${1:name}',\\$${2:name})$0" },
{ "trigger": "->avg()", "contents": "->avg()$0" },
{ "trigger": "auto_charset()", "contents": "auto_charset(${1:\\$fContents}${2:,\\$from='gbk'}${3:,\\$to='utf-8'})$0" },
{ "trigger": "->buildSql()", "contents": "->buildSql()$0" },
{ "trigger": "build_count_rand()", "contents": "build_count_rand(${1:\\$num}${2:,\\$length=4}${3:,\\$mode=1})$0" },
{ "trigger": "build_verify()", "contents": "build_verify(${1:\\$length=4}${2:\\$mode=1})$0" },
{ "trigger": "byte_format()", "contents": "byte_format(${1:\\$size}${2:,\\$dec=2})$0" },
{ "trigger": "->commit()", "contents": "->commit()$0" },
{ "trigger": "cookie", "contents": "cookie(${1:\\$name}${2:,\\$value}${3:,\\$option})$0" },
{ "trigger": "->count", "contents": "->count$0" },
{ "trigger": "->create()", "contents": "->create()$0" },
{ "trigger": "->delete()", "contents": "->delete()$0" },
{ "trigger": "display", "contents": "\\$this->display(${1:})$0" },
{ "trigger": "->distinct", "contents": "->distinct('${1:}')$0" },
{ "trigger": "dump", "contents": "dump('${1:str}')$0" },
{ "trigger": "error", "contents": "error('${1:name}')$0" },
{ "trigger": "->execute", "contents": "->execute(${1:})$0" },
{ "trigger": "->fetch", "contents": "->fetch('${1:}')$0" },
{ "trigger": "field()", "contents": "field()$0" },
{ "trigger": "find()", "contents": "find()$0" },
{ "trigger": "F", "contents": "F($name, $value='', $path=DATA_PATH)$0" },
{ "trigger": "get_client_ip", "contents": "get_client_ip(${1:\\$type})$0" },
{ "trigger": "getActionName()", "contents": "getActionName()$0" },
{ "trigger": "getDbError()", "contents": "getDbError()$0" },
{ "trigger": "getError()", "contents": "getError()$0" },
{ "trigger": "->getField", "contents": "->getField(${1:\\$field},${2:\\$value})$0" },
{ "trigger": "getModelName()", "contents": "getModelName()$0" },
{ "trigger": "getTableName()", "contents": "getTableName()$0" },
{ "trigger": "group()", "contents": "group('${1:}')$0" },
{ "trigger": "h", "contents": "h(${1:\\$text}${2:, \\$tags = null})$0" },
{ "trigger": "having()", "contents": "having('${1:}')$0" },
{ "trigger": "halt", "contents": "halt(${1:\\$error})$0" },
{ "trigger": "highlight_code", "contents": "highlight_code(${1:\\$str}${2:,\\$show=false})$0" },
{ "trigger": "isAjax()", "contents": "\\$this->isAjax()$0" },
{ "trigger": "isDelete()", "contents": "\\$this->isDelete()$0" },
{ "trigger": "isGet()", "contents": "\\$this->isGet()$0" },
{ "trigger": "isHead()", "contents": "\\$this->isHead()$0" },
{ "trigger": "isPost()", "contents": "\\$this->isPost()$0" },
{ "trigger": "isPut()", "contents": "\\$this->isPut()$0" },
{ "trigger": "is_utf8()", "contents": "is_utf8(${1:\\$string})$0" },
{ "trigger": "is_ssl()", "contents": "is_ssl()$0" },
{ "trigger": "join", "contents": "join(${1:\\$join})$0" },
{ "trigger": "->limit", "contents": "->limit(${1:})$0" },
{ "trigger": "layout", "contents": "layout(${1:\\$layout})$0" },
{ "trigger": "list_search()", "contents": "list_search(${1:\\$list},${2:\\$condition})$0" },
{ "trigger": "list_sort_by()", "contents": "list_sort_by(${1:\\$list},${2:\\$field}${3:,\\$sortby='asc'})$0" },
{ "trigger": "list_to_tree()", "contents": "list_to_tree(${1:\\$list}${2:,\\$pk='id'}${3:,\\$pid='pid'}${4:,\\$child='_child'}${5:,\\$root=0})$0" },
{ "trigger": "lock()", "contents": "lock('${1:}')$0" },
{ "trigger": "max()", "contents": "max()$0" },
{ "trigger": "min()", "contents": "min()$0" },
{ "trigger": "Model", "contents": "Class ${1:New}Model extends Model{\n ${2:}\n}$0" },
{ "trigger": "msubstr()", "contents": "msubstr(${1:\\$str},${2:0},${3:\\$length}${4:,\"utf-8\"}${5:,\\$suffix=true})$0" },
{ "trigger": "->order", "contents": "->order('${1:}')$0" },
{ "trigger": "page()", "contents": "page(${1:})$0" },
{ "trigger": "query()", "contents": "query(${1:})$0" },
{ "trigger": "rand_string()", "contents": "rand_string(${1:6}${2:,\\$type}${3:,\\$addStr})$0" },
{ "trigger": "redirect", "contents": "redirect(${1:\\$url}${2:,\\$time}${3:,\\$msg})$0" },
{ "trigger": "redirect()", "contents": "\\$this->redirect(${1:'\\$url'}${2:,\\$params}${3:,\\$delay}${4:,\\$msg})$0" },
{ "trigger": "remove_xss()", "contents": "remove_xss(${1:\\$val})$0" },
{ "trigger": "rollback()", "contents": "rollback()$0" },
{ "trigger": "scope()", "contents": "scope(${1:${2:\\$scope}${3:,\\$args}})$0" },
{ "trigger": "send_http_status", "contents": "send_http_status(${1:\\$code})$0" },
{ "trigger": "selectAdd()", "contents": "selectAdd(\\$${1:fields},\\$${2:table}${3:,\\$options})$0" },
{ "trigger": "session", "contents": "session(${1:\\$name}${2:,\\$value})$0" },
{ "trigger": "setField()", "contents": "setField(\\$${1:field},\\$${2:value})$0" },
{ "trigger": "setInc()", "contents": "setInc(\\$${1:field}${2:,\\$step})$0" },
{ "trigger": "setProperty()", "contents": "setProperty(${1:name},${2:value})$0" },
{ "trigger": "startTrans()", "contents": "startTrans()$0" },
{ "trigger": "success", "contents": "success('${1:info}')$0" },
{ "trigger": "sum()", "contents": "sum()$0" },
{ "trigger": "switchModel()", "contents": "switchModel(\\$${1:type},\\$${2:var})$0" },
{ "trigger": "S", "contents": "S(${1:\\$name}${2:,\\$value}${3:,\\$options})$0" },
{ "trigger": "table()", "contents": "table('${1:}')$0" },
{ "trigger": "tablePrefix", "contents": "protected \\$tablePrefix$0" },
{ "trigger": "throw_exception", "contents": "throw_exception(${1:\\$msg}${2:,\\$type}${3:,\\$code})$0" },
{ "trigger": "trueTableName", "contents": "protected \\$trueTableName$0" },
{ "trigger": "ts", "contents": "\\$this->$0" },
{ "trigger": "ubb()", "contents": "ubb(${1:\\$text})$0" },
{ "trigger": "val", "contents": "protected \\$_validate = array(\n array('verify','require','验证码必须!'), //默认情况下用正则进行验证\n array('name','','帐号名称已经存在!',0,'unique',1), // 在新增的时候验证name字段是否唯一\n array('value',array(1,2,3),'值的范围不正确!',2,'in'), // 当值不为空的时候判断是否在一个范围内\n array('repassword','password','确认密码不正确',0,'confirm'), // 验证确认密码是否和密码一致\n array('password','checkPwd','密码格式不正确',0,'function'), // 自定义函数验证密码格式\n);\n$0" },
{ "trigger": "where()", "contents": "where('${1:}')$0" },
{ "trigger": "W", "contents": "W(${1:\\$name},${2:array()}${3:,\\$return})$0" },
{ "trigger": "m_auto", "contents": "protected \\$_auto = array (\n array('status','1'), // 新增的时候把status字段设置为1\n array('password','md5',1,'function') , // 对password字段在新增的时候使md5函数处理\n array('name','getName',1,'callback'), // 对name字段在新增的时候回调getName方法\n array('create_time','time',2,'function'), // 对create_time字段在更新的时候写入当前时间戳\n);$0" },
{ "trigger": "Action", "contents": "\nClass ${1:Index}Action extends Action{\n public function ${2:index}(){\n ${3:}\n }\n}" }
]
}