Commit ccb58b9 1 parent e9b0ae9 commit ccb58b9 Copy full SHA for ccb58b9
File tree 4 files changed +11
-11
lines changed
4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -50,12 +50,12 @@ class BaseCombinator {
50
50
}
51
51
}
52
52
53
- combineOutputParts ( config , outputParts ) {
53
+ combineOutputParts ( config , outputParts , append = false ) {
54
54
const globalEmitter = new Emitter ( config ) ;
55
55
globalEmitter . emit ( outputParts . head ) ;
56
56
globalEmitter . emit ( outputParts . body ) ;
57
57
globalEmitter . emit ( outputParts . foot ) ;
58
- globalEmitter . save ( ) ;
58
+ globalEmitter . save ( append ) ;
59
59
}
60
60
61
61
coreClass ( objName ) {
Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ const BasePackageInfo = require('../common/package_info');
6
6
7
7
const { _deepClone, _render } = require ( '../../lib/helper' ) ;
8
8
9
- const OPTION_LOCAL = 1 ; // use local tmpl file to render content
10
- const OPTION_SOURCE = 2 ; // config by Darafile.{lang}.packageInfo
11
- const OPTION_RENDER = 4 ; // render content from tmpl
12
- const OPTION_UPDATE = 8 ; // update if file already exist
9
+ const OPTION_LOCAL = 0b1 ; // use local tmpl file to render content
10
+ const OPTION_SOURCE = 0b10 ; // config by Darafile.{lang}.packageInfo
11
+ const OPTION_RENDER = 0b100 ; // render content from tmpl
12
+ const OPTION_UPDATE = 0b1000 ; // update if file already exist
13
13
14
14
// file_name : OPTIONS
15
15
const files = {
Original file line number Diff line number Diff line change 16
16
class MyModel extends Model {
17
17
protected $ _name = [
18
18
'name ' => 'realName ' ,
19
- 'link ' => 'personal_photo ' ,
19
+ 'link ' => 'link ' ,
20
20
];
21
21
public function validate () {
22
22
Model::validateRequired ('stringfield ' , $ this ->stringfield , true );
@@ -205,7 +205,7 @@ public function toMap() {
205
205
$ res ['uint64Field ' ] = $ this ->uint64Field ;
206
206
}
207
207
if (null !== $ this ->link ) {
208
- $ res ['personal_photo ' ] = $ this ->link ;
208
+ $ res ['link ' ] = $ this ->link ;
209
209
}
210
210
return $ res ;
211
211
}
@@ -338,8 +338,8 @@ public static function fromMap($map = []) {
338
338
if (isset ($ map ['uint64Field ' ])){
339
339
$ model ->uint64Field = $ map ['uint64Field ' ];
340
340
}
341
- if (isset ($ map ['personal_photo ' ])){
342
- $ model ->link = $ map ['personal_photo ' ];
341
+ if (isset ($ map ['link ' ])){
342
+ $ model ->link = $ map ['link ' ];
343
343
}
344
344
return $ model ;
345
345
}
Original file line number Diff line number Diff line change @@ -44,5 +44,5 @@ model MyModel = {
44
44
uint16Field: uint16,
45
45
uint32Field: uint32,
46
46
uint64Field: uint64,
47
- link?: string(name='personal_photo ', example='http://*/*.png'),
47
+ link?: string(name='link ', example='http://*/*.png'),
48
48
};
You can’t perform that action at this time.
0 commit comments