58
58
$ stopwatch ->Start ();
59
59
60
60
$ text = GetDecodedText ($ currentContent );
61
- $ currentContent ->SetSummary ( $ text ['summary ' ]) ;
62
- $ currentContent ->SetBody ( $ text ['body ' ]) ;
61
+ $ currentContent ->summary = $ text ['summary ' ];
62
+ $ currentContent ->body = $ text ['body ' ];
63
63
64
64
$ vars ['pageBuildReport ' ]['times ' ]['parse ' ]['ms ' ] = $ stopwatch ->Elapsed () * 1000 ;
65
65
66
66
// ChildContentsの取得
67
- $ childrenPathList = $ currentContent ->ChildPathList () ;
67
+ $ childrenPathList = $ currentContent ->childPathList ;
68
68
$ childrenPathListCount = count ($ childrenPathList );
69
69
for ($ i = 0 ; $ i < $ childrenPathListCount ; $ i ++) {
70
70
$ child = $ currentContent ->Child ($ i );
87
87
// LeftContent, RightContentの取得
88
88
if (isset ($ parents [0 ])) {
89
89
$ parent = $ parents [0 ];
90
- $ brothers = $ parent ->ChildPathList () ;
90
+ $ brothers = $ parent ->childPathList ;
91
91
$ myIndex = $ currentContent ->ChildIndex ();
92
92
93
93
if ($ myIndex >= 0 ) {
119
119
//
120
120
$ contentsIsChanged =
121
121
(!array_key_exists ('contentsChangedTime ' , ContentsDatabase::$ metadata ) ||
122
- $ currentContent ->UpdatedAtTimestamp () > ContentsDatabase::$ metadata ['contentsChangedTime ' ]);
122
+ $ currentContent ->modifiedTime > ContentsDatabase::$ metadata ['contentsChangedTime ' ]);
123
123
124
124
$ cache = new Cache ;
125
- $ cache ->Connect ($ currentContent ->Path () );
125
+ $ cache ->Connect ($ currentContent ->path );
126
126
127
127
$ cache ->Lock (LOCK_SH );
128
128
$ cache ->Fetch ();
175
175
176
176
// title作成
177
177
$ title = "" ;
178
- $ title .= NotBlankTitle ($ currentContent ->Title () );
178
+ $ title .= NotBlankTitle ($ currentContent ->title );
179
179
if (isset ($ parents [0 ])) {
180
- $ title .= " | " . NotBlankTitle ($ parents [0 ]->Title () );
180
+ $ title .= " | " . NotBlankTitle ($ parents [0 ]->title );
181
181
}
182
182
$ vars ['pageTitle ' ] = $ title ;
183
183
188
188
}
189
189
190
190
// pageHeading の作成
191
- $ vars ['pageHeading ' ]['title ' ] = NotBlankTitle ($ currentContent ->Title () );
191
+ $ vars ['pageHeading ' ]['title ' ] = NotBlankTitle ($ currentContent ->title );
192
192
$ parentTitlePathList = [];
193
193
foreach ($ parents as $ parent ){
194
194
if ($ parent === false ) break ;
195
- $ parentTitlePathList [] = ['title ' => NotBlankTitle ($ parent ->Title ()) , 'path ' => CreateContentHREF ($ parent ->Path () )];
195
+ $ parentTitlePathList [] = ['title ' => NotBlankTitle ($ parent ->title ) , 'path ' => CreateContentHREF ($ parent ->path )];
196
196
}
197
197
$ vars ['pageHeading ' ]['parents ' ] = $ parentTitlePathList ;
198
198
199
199
// Left, Right Content の設定
200
200
if (!is_null ($ leftContent ) && $ leftContent !== false ) {
201
- $ vars ['leftContent ' ] = ['title ' => NotBlankTitle ($ leftContent ->Title ()) , 'url ' => CreateContentHREF ($ leftContent ->Path () )];
201
+ $ vars ['leftContent ' ] = ['title ' => NotBlankTitle ($ leftContent ->title ) , 'url ' => CreateContentHREF ($ leftContent ->path )];
202
202
}
203
203
204
204
if (!is_null ($ rightContent ) && $ rightContent !== false ) {
205
- $ vars ['rightContent ' ] = ['title ' => NotBlankTitle ($ rightContent ->Title ()) , 'url ' => CreateContentHREF ($ rightContent ->Path () )];
205
+ $ vars ['rightContent ' ] = ['title ' => NotBlankTitle ($ rightContent ->title ) , 'url ' => CreateContentHREF ($ rightContent ->path )];
206
206
}
207
207
208
208
// navigator の設定
209
209
$ vars ['navigator ' ] = $ navigator ;
210
210
211
211
// file date の設定
212
- $ vars ['fileDate ' ] = ['createdAt ' => $ currentContent ->CreatedAt () , 'updatedAt ' => $ currentContent ->UpdatedAt () ];
212
+ $ vars ['fileDate ' ] = ['createdTime ' => $ currentContent ->createdTime , 'modifiedTime ' => $ currentContent ->modifiedTime ];
213
213
214
214
// tagline の設定
215
- $ vars ['tagline ' ]['tags ' ] = $ currentContent ->Tags () ;
215
+ $ vars ['tagline ' ]['tags ' ] = $ currentContent ->tags ;
216
216
217
217
// content summary の設定
218
- $ vars ['contentSummary ' ] = $ currentContent ->Summary () ;
218
+ $ vars ['contentSummary ' ] = $ currentContent ->summary ;
219
219
220
220
// tagList と 最新のコンテンツ 設定
221
221
if ($ currentContent ->IsRoot ()){
233
233
}
234
234
235
235
// content body の設定
236
- $ vars ['contentBody ' ] = $ currentContent ->Body () ;
236
+ $ vars ['contentBody ' ] = $ currentContent ->body ;
237
237
238
238
// child list の設定
239
239
$ vars ['childList ' ] = []; // [ ['title' => '', 'summary' => '', 'url' => ''], ... ]
240
240
241
241
foreach ($ children as $ child ) {
242
242
$ vars ['childList ' ][] = [
243
- 'title ' => NotBlankTitle ($ child ->Title () ),
243
+ 'title ' => NotBlankTitle ($ child ->title ),
244
244
'summary ' => GetDecodedText ($ child )['summary ' ],
245
- 'url ' => CreateContentHREF ($ child ->Path () )
245
+ 'url ' => CreateContentHREF ($ child ->path )
246
246
];
247
247
}
248
248
260
260
// 警告表示設定
261
261
262
262
// $vars['warningMessages'][] = "Hello world";
263
- $ vars ['warningMessages ' ] = array_merge ($ vars ['warningMessages ' ], GetMessages ($ currentContent ->Path () ));
263
+ $ vars ['warningMessages ' ] = array_merge ($ vars ['warningMessages ' ], GetMessages ($ currentContent ->path ));
264
264
265
265
if ($ vars ['pageBuildReport ' ]['times ' ]['build ' ]['ms ' ] > 1000 ) {
266
266
Debug::LogWarning ("
267
267
Performance Note:
268
- Page Title: {$ currentContent ->Title () }
269
- Page Path: {$ currentContent ->Path () }
268
+ Page Title: {$ currentContent ->title }
269
+ Page Path: {$ currentContent ->path }
270
270
--- Build Report ---
271
271
" . print_r ($ vars ['pageBuildReport ' ], true ) . "
272
272
-------------------- "
@@ -282,12 +282,12 @@ function CreateNavHelper($parents, $parentsIndex, $currentContent, $children, &$
282
282
{
283
283
if ($ parentsIndex < 0 ) {
284
284
// echo '1+';
285
- $ navigator .= '<li><a class = "selected" href=" ' . CreateContentHREF ($ currentContent ->Path ()) . '"> ' . NotBlankTitle ($ currentContent ->Title () ) . '</a></li> ' ;
285
+ $ navigator .= '<li><a class = "selected" href=" ' . CreateContentHREF ($ currentContent ->path ) . '"> ' . NotBlankTitle ($ currentContent ->title ) . '</a></li> ' ;
286
286
287
287
$ navigator .= "<ul> " ;
288
288
foreach ($ children as $ c ) {
289
289
290
- $ navigator .= '<li><a href=" ' . CreateContentHREF ($ c ->Path ()) . '"> ' . NotBlankTitle ($ c ->Title () ) . '</a></li> ' ;
290
+ $ navigator .= '<li><a href=" ' . CreateContentHREF ($ c ->path ) . '"> ' . NotBlankTitle ($ c ->title ) . '</a></li> ' ;
291
291
}
292
292
293
293
$ navigator .= "</ul> " ;
@@ -297,7 +297,7 @@ function CreateNavHelper($parents, $parentsIndex, $currentContent, $children, &$
297
297
298
298
$ childrenCount = $ parents [$ parentsIndex ]->ChildCount ();
299
299
300
- $ navigator .= '<li><a class = "selected" href=" ' . CreateContentHREF ($ parents [$ parentsIndex ]->Path ()) . '"> ' . NotBlankTitle ($ parents [$ parentsIndex ]->Title () ) . '</a></li> ' ;
300
+ $ navigator .= '<li><a class = "selected" href=" ' . CreateContentHREF ($ parents [$ parentsIndex ]->path ) . '"> ' . NotBlankTitle ($ parents [$ parentsIndex ]->title ) . '</a></li> ' ;
301
301
302
302
$ navigator .= "<ul> " ;
303
303
if ($ parentsIndex == 0 ) {
@@ -311,15 +311,15 @@ function CreateNavHelper($parents, $parentsIndex, $currentContent, $children, &$
311
311
}
312
312
313
313
if ($ i == $ currentContentIndex ) {
314
- $ navigator .= '<li><a class = "selected" href=" ' . CreateContentHREF ($ child ->Path ()) . '"> ' . NotBlankTitle ($ child ->Title () ) . '</a></li> ' ;
314
+ $ navigator .= '<li><a class = "selected" href=" ' . CreateContentHREF ($ child ->path ) . '"> ' . NotBlankTitle ($ child ->title ) . '</a></li> ' ;
315
315
316
316
$ navigator .= "<ul> " ;
317
317
foreach ($ children as $ c ) {
318
- $ navigator .= '<li><a href=" ' . CreateContentHREF ($ c ->Path ()) . '"> ' . NotBlankTitle ($ c ->Title () ) . '</a></li> ' ;
318
+ $ navigator .= '<li><a href=" ' . CreateContentHREF ($ c ->path ) . '"> ' . NotBlankTitle ($ c ->title ) . '</a></li> ' ;
319
319
}
320
320
$ navigator .= "</ul> " ;
321
321
} else {
322
- $ navigator .= '<li><a href=" ' . CreateContentHREF ($ child ->Path ()) . '"> ' . NotBlankTitle ($ child ->Title () ) . '</a></li> ' ;
322
+ $ navigator .= '<li><a href=" ' . CreateContentHREF ($ child ->path ) . '"> ' . NotBlankTitle ($ child ->title ) . '</a></li> ' ;
323
323
}
324
324
}
325
325
} else {
@@ -333,7 +333,7 @@ function CreateNavHelper($parents, $parentsIndex, $currentContent, $children, &$
333
333
if ($ child === false ) {
334
334
continue ;
335
335
}
336
- $ navigator .= '<li><a href=" ' . CreateContentHREF ($ child ->Path ()) . '"> ' . NotBlankTitle ($ child ->Title () ) . '</a></li> ' ;
336
+ $ navigator .= '<li><a href=" ' . CreateContentHREF ($ child ->path ) . '"> ' . NotBlankTitle ($ child ->title ) . '</a></li> ' ;
337
337
}
338
338
}
339
339
}
0 commit comments