-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhtml.json
98 lines (98 loc) · 1.95 KB
/
html.json
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
{
"PHP trigger": {
"prefix": "php",
"body": [
"<?php ${1:echo $0} ?>",
],
"description": "CodeIgniter Controller"
},
"CodeIgniter Controller": {
"prefix": "controller",
"body": [
"<?php",
"defined('BASEPATH') OR exit('No direct script access allowed');",
"",
"class ${TM_FILENAME/(.*)\\..+$/$1/} extends ${2:CI}_Controller {",
"",
"\tpublic function __construct() {",
"\t\tparent::__construct();",
"\t}",
"",
"\tpublic function index()",
"\t{",
"\t\t${0:# code...}",
"\t}",
"",
"}",
"",
"/* End of file: $TM_FILENAME */",
""
],
"description": "CodeIgniter Controller"
},
"CodeIgniter Helper": {
"prefix": "helper",
"body": [
"<?php",
"defined('BASEPATH') OR exit('No direct script access allowed');",
"",
"if ( ! function_exists('${1:foo}'))",
"{",
"\tfunction $1(${4:\\$${2:var} = '$3'})",
"\t{",
"\t\t${0:# code...}",
"\t}",
"}",
"",
"/* End of file: $TM_FILENAME */",
""
],
"description": "CodeIgniter Helper"
},
"CodeIgniter Library": {
"prefix": "library",
"body": [
"<?php",
"defined('BASEPATH') OR exit('No direct script access allowed');",
"",
"class ${TM_FILENAME/(.*)\\..+$/$1/} {",
"",
"\tprotected \\$CI;",
"",
"\tpublic function __construct() {",
"\t\t\\$this->CI =& get_instance();",
"\t}",
"",
"\t${0:# code...}",
"",
"}",
"",
"/* End of file: $TM_FILENAME */",
""
],
"description": "CodeIgniter Model"
},
"CodeIgniter Model": {
"prefix": "model",
"body": [
"<?php",
"defined('BASEPATH') OR exit('No direct script access allowed');",
"",
"class ${TM_FILENAME/(.*)\\..+$/$1/} extends ${1:CI}_Model {",
"",
"\t${3:protected \\$table = '$2';}",
"",
"\tpublic function __construct() {",
"\t\tparent::__construct();",
"\t}",
"",
"\t${0:# code...}",
"",
"}",
"",
"/* End of file: $TM_FILENAME */",
""
],
"description": "CodeIgniter Model"
}
}