Passed
Pull Request — master (#86)
by Rustam
02:19
created

WebView::head()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\View;
6
7
use Yiisoft\Arrays\ArrayHelper;
8
use Yiisoft\Html\Html;
9
use Yiisoft\View\Event\BodyBegin;
10
use Yiisoft\View\Event\BodyEnd;
11
use Yiisoft\View\Event\PageEnd;
12
use Yiisoft\Yii\Web\Middleware\Csrf;
0 ignored issues
show
Bug introduced by
The type Yiisoft\Yii\Web\Middleware\Csrf was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
14
/**
15
 * View represents a view object in the MVC pattern.
16
 *
17
 * View provides a set of methods (e.g. {@see render()} for rendering purpose.
18
 *
19
 * You can modify its configuration by adding an array to your application config under `components` as it is shown in
20
 * the following example:
21
 *
22
 * ```php
23
 * 'view' => [
24
 *     'theme' => 'app\themes\MyTheme',
25
 *     'renderers' => [
26
 *         // you may add Smarty or Twig renderer here
27
 *     ]
28
 *     // ...
29
 * ]
30
 * ```
31
 *
32
 * For more details and usage information on View, see the [guide article on views](guide:structure-views).
33
 */
34
class WebView extends View
35
{
36
    /**
37
     * The location of registered JavaScript code block or files.
38
     * This means the location is in the head section.
39
     */
40
    public const POSITION_HEAD = 1;
41
42
    /**
43
     * The location of registered JavaScript code block or files.
44
     * This means the location is at the beginning of the body section.
45
     */
46
    public const POSITION_BEGIN = 2;
47
48
    /**
49
     * The location of registered JavaScript code block or files.
50
     * This means the location is at the end of the body section.
51
     */
52
    public const POSITION_END = 3;
53
54
    /**
55
     * The location of registered JavaScript code block.
56
     * This means the JavaScript code block will be executed when HTML document composition is ready.
57
     */
58
    public const POSITION_READY = 4;
59
60
    /**
61
     * The location of registered JavaScript code block.
62
     * This means the JavaScript code block will be executed when HTML page is completely loaded.
63
     */
64
    public const POSITION_LOAD = 5;
65
66
    /**
67
     * This is internally used as the placeholder for receiving the content registered for the head section.
68
     */
69
    private const PLACEHOLDER_HEAD = '<![CDATA[YII-BLOCK-HEAD-%s]]>';
70
71
    /**
72
     * This is internally used as the placeholder for receiving the content registered for the beginning of the body
73
     * section.
74
     */
75
    private const PLACEHOLDER_BODY_BEGIN = '<![CDATA[YII-BLOCK-BODY-BEGIN-%s]]>';
76
77
    /**
78
     * This is internally used as the placeholder for receiving the content registered for the end of the body section.
79
     */
80
    private const PLACEHOLDER_BODY_END = '<![CDATA[YII-BLOCK-BODY-END-%s]]>';
81
82
    /**
83
     * @var string the page title
84
     */
85
    private string $title;
86
87
    /**
88
     * @var array the registered meta tags.
89
     *
90
     * {@see registerMetaTag()}
91
     */
92
    private array $metaTags = [];
93
94
    /**
95
     * @var array the registered link tags.
96
     *
97
     * {@see registerLinkTag()}
98
     */
99
    private array $linkTags = [];
100
101
    /**
102
     * @var array the registered CSS code blocks.
103
     *
104
     * {@see registerCss()}
105
     */
106
    private array $css = [];
107
108
    /**
109
     * @var array the registered CSS files.
110
     *
111
     * {@see registerCssFile()}
112
     */
113
    private array $cssFiles = [];
114
115
    /**
116
     * @var array the registered JS code blocks
117
     *
118
     * {@see registerJs()}
119
     */
120
    private array $js = [];
121
122
    /**
123
     * @var array the registered JS files.
124
     *
125
     * {@see registerJsFile()}
126
     */
127
    private array $jsFiles = [];
128
129
    /**
130
     * Marks the position of an HTML head section.
131
     */
132 4
    public function head(): void
133
    {
134 4
        echo sprintf(self::PLACEHOLDER_HEAD, $this->getPlaceholderSignature());
135 4
    }
136
137
    /**
138
     * Marks the beginning of an HTML body section.
139
     */
140 4
    public function beginBody(): void
141
    {
142 4
        echo sprintf(self::PLACEHOLDER_BODY_BEGIN, $this->getPlaceholderSignature());
143 4
        $this->eventDispatcher->dispatch(new BodyBegin($this->getViewFile()));
0 ignored issues
show
Bug introduced by
It seems like $this->getViewFile() can also be of type boolean; however, parameter $file of Yiisoft\View\Event\BodyBegin::__construct() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

143
        $this->eventDispatcher->dispatch(new BodyBegin(/** @scrutinizer ignore-type */ $this->getViewFile()));
Loading history...
144 4
    }
145
146
    /**
147
     * Marks the ending of an HTML body section.
148
     */
149 4
    public function endBody(): void
150
    {
151 4
        $this->eventDispatcher->dispatch(new BodyEnd($this->getViewFile()));
0 ignored issues
show
Bug introduced by
It seems like $this->getViewFile() can also be of type boolean; however, parameter $file of Yiisoft\View\Event\BodyEnd::__construct() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

151
        $this->eventDispatcher->dispatch(new BodyEnd(/** @scrutinizer ignore-type */ $this->getViewFile()));
Loading history...
152 4
        echo sprintf(self::PLACEHOLDER_BODY_END, $this->getPlaceholderSignature());
153 4
    }
154
155
    /**
156
     * Marks the ending of an HTML page.
157
     *
158
     * @param bool $ajaxMode whether the view is rendering in AJAX mode. If true, the JS scripts registered at
159
     * {@see POSITION_READY} and {@see POSITION_LOAD} positions will be rendered at the end of the view like
160
     * normal scripts.
161
     */
162 4
    public function endPage($ajaxMode = false): void
163
    {
164 4
        $this->eventDispatcher->dispatch(new PageEnd($this->getViewFile()));
0 ignored issues
show
Bug introduced by
It seems like $this->getViewFile() can also be of type boolean; however, parameter $file of Yiisoft\View\Event\PageEnd::__construct() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

164
        $this->eventDispatcher->dispatch(new PageEnd(/** @scrutinizer ignore-type */ $this->getViewFile()));
Loading history...
165
166 4
        $content = ob_get_clean();
167
168 4
        echo strtr(
169
            $content,
170
            [
171 4
                sprintf(self::PLACEHOLDER_HEAD, $this->getPlaceholderSignature()) => $this->renderHeadHtml(),
172 4
                sprintf(self::PLACEHOLDER_BODY_BEGIN, $this->getPlaceholderSignature()) => $this->renderBodyBeginHtml(),
173 4
                sprintf(self::PLACEHOLDER_BODY_END, $this->getPlaceholderSignature()) => $this->renderBodyEndHtml(
174 4
                    $ajaxMode
175
                ),
176
            ]
177
        );
178
179 4
        $this->clear();
180 4
    }
181
182
    /**
183
     * Renders a view in response to an AJAX request.
184
     *
185
     * This method is similar to {@see render()} except that it will surround the view being rendered with the calls of
186
     * {@see beginPage()}, {@see head()}, {@see beginBody()}, {@see endBody()} and {@see endPage()}. By doing so, the
187
     * method is able to inject into the rendering result with JS/CSS scripts and files that are registered with the
188
     * view.
189
     *
190
     * @param string $view the view name. Please refer to {@see render()} on how to specify this parameter.
191
     * @param array $params the parameters (name-value pairs) that will be extracted and made available in the view
192
     * file.
193
     * @param ViewContextInterface|null $context the context that the view should use for rendering the view. If null,
194
     * existing {@see context} will be used.
195
     *
196
     * @return string the rendering result
197
     *
198
     * {@see render()}
199
     */
200
    public function renderAjax(string $view, array $params = [], ?ViewContextInterface $context = null): string
201
    {
202
        $viewFile = $this->findTemplateFile($view, $context);
203
204
        ob_start();
205
        ob_implicit_flush(0);
206
207
        $this->beginPage();
208
        $this->head();
209
        $this->beginBody();
210
        echo $this->renderFile($viewFile, $params, $context);
211
        $this->endBody();
212
        $this->endPage(true);
213
214
        return ob_get_clean();
215
    }
216
217
    /**
218
     * Clears up the registered meta tags, link tags, css/js scripts and files.
219
     *
220
     * @return void
221
     */
222 4
    public function clear(): void
223
    {
224 4
        $this->metaTags = [];
225 4
        $this->linkTags = [];
226 4
        $this->css = [];
227 4
        $this->cssFiles = [];
228 4
        $this->js = [];
229 4
        $this->jsFiles = [];
230 4
    }
231
232
    /**
233
     * Registers a meta tag.
234
     *
235
     * For example, a description meta tag can be added like the following:
236
     *
237
     * ```php
238
     * $view->registerMetaTag([
239
     *     'name' => 'description',
240
     *     'content' => 'This website is about funny raccoons.'
241
     * ]);
242
     * ```
243
     *
244
     * will result in the meta tag `<meta name="description" content="This website is about funny raccoons.">`.
245
     *
246
     * @param array $options the HTML attributes for the meta tag.
247
     * @param string $key the key that identifies the meta tag. If two meta tags are registered with the same key, the
248
     * latter will overwrite the former. If this is null, the new meta tag will be appended to the
249
     * existing ones.
250
     *
251
     * @return void
252
     */
253
    public function registerMetaTag(array $options, string $key = null): void
254
    {
255
        if ($key === null) {
256
            $this->metaTags[] = Html::tag('meta', '', $options);
257
        } else {
258
            $this->metaTags[$key] = Html::tag('meta', '', $options);
259
        }
260
    }
261
262
    /**
263
     * Registers a link tag.
264
     *
265
     * For example, a link tag for a custom [favicon](http://www.w3.org/2005/10/howto-favicon) can be added like the
266
     * following:
267
     *
268
     * ```php
269
     * $view->registerLinkTag(['rel' => 'icon', 'type' => 'image/png', 'href' => '/myicon.png']);
270
     * ```
271
     *
272
     * which will result in the following HTML: `<link rel="icon" type="image/png" href="/myicon.png">`.
273
     *
274
     * **Note:** To register link tags for CSS stylesheets, use {@see registerCssFile()]} instead, which has more
275
     * options for this kind of link tag.
276
     *
277
     * @param array $options the HTML attributes for the link tag.
278
     * @param string|null $key the key that identifies the link tag. If two link tags are registered with the same
279
     * key, the latter will overwrite the former. If this is null, the new link tag will be appended
280
     * to the existing ones.
281
     */
282
    public function registerLinkTag(array $options, ?string $key = null): void
283
    {
284
        if ($key === null) {
285
            $this->linkTags[] = Html::tag('link', '', $options);
286
        } else {
287
            $this->linkTags[$key] = Html::tag('link', '', $options);
288
        }
289
    }
290
291
    /**
292
     * Registers CSRF meta tags.
293
     *
294
     * They are rendered dynamically to retrieve a new CSRF token for each request.
295
     *
296
     * ```php
297
     * $view->registerCsrfMetaTags();
298
     * ```
299
     *
300
     * The above code will result in `<meta name="csrf-param" content="[\Yiisoft\Web\Request::$csrfParam]">` and
301
     * `<meta name="csrf-token" content="tTNpWKpdy-bx8ZmIq9R72...K1y8IP3XGkzZA==">` added to the page.
302
     *
303
     * Note: Hidden CSRF input of ActiveForm will be automatically refreshed by calling `window.yii.refreshCsrfToken()`
304
     * from `yii.js`.
305
     */
306
    public function registerCsrfMetaTags(): void
307
    {
308
        $this->metaTags['csrf_meta_tags'] = $this->csrf();
309
    }
310
311
    /**
312
     * Registers a CSS code block.
313
     *
314
     * @param string $css the content of the CSS code block to be registered
315
     * @param array $options the HTML attributes for the `<style>`-tag.
316
     * @param string $key the key that identifies the CSS code block. If null, it will use $css as the key. If two CSS
317
     * code blocks are registered with the same key, the latter will overwrite the former.
318
     */
319
    public function registerCss(string $css, array $options = [], string $key = null): void
320
    {
321
        $key = $key ?: md5($css);
322
        $this->css[$key] = Html::style($css, $options);
323
    }
324
325
    /**
326
     * Registers a CSS file.
327
     *
328
     * This method should be used for simple registration of CSS files. If you want to use features of
329
     * {@see \Yiisoft\Assets\AssetManager} like appending timestamps to the URL and file publishing options, use
330
     * {@see \Yiisoft\Assets\AssetBundle}.
331
     *
332
     * @param string $url the CSS file to be registered.
333
     * @param array $options the HTML attributes for the link tag. Please refer to {@see \Yiisoft\Html\Html::cssFile()}
334
     * for the supported options.
335
     *
336
     * @param string $key the key that identifies the CSS script file. If null, it will use $url as the key. If two CSS
337
     * files are registered with the same key, the latter will overwrite the former.
338
     *
339
     * @return void
340
     */
341 1
    public function registerCssFile(string $url, array $options = [], string $key = null): void
342
    {
343 1
        $key = $key ?: $url;
344
345 1
        $this->cssFiles[$key] = Html::cssFile($url, $options);
346 1
    }
347
348
    /**
349
     * Registers a JS code block.
350
     *
351
     * @param string $js the JS code block to be registered
352
     * @param int $position the position at which the JS script tag should be inserted in a page.
353
     *
354
     * The possible values are:
355
     *
356
     * - {@see POSITION_HEAD}: in the head section
357
     * - {@see POSITION_BEGIN}: at the beginning of the body section
358
     * - {@see POSITION_END}: at the end of the body section. This is the default value.
359
     * - {@see POSITION_LOAD}: executed when HTML page is completely loaded.
360
     * - {@see POSITION_READY}: executed when HTML document composition is ready.
361
     *
362
     * @param string $key the key that identifies the JS code block. If null, it will use $js as the key. If two JS code
363
     * blocks are registered with the same key, the latter will overwrite the former.
364
     *
365
     * @return void
366
     */
367 1
    public function registerJs(string $js, int $position = self::POSITION_END, string $key = null): void
368
    {
369 1
        $key = $key ?: md5($js);
370 1
        $this->js[$position][$key] = $js;
371 1
    }
372
373
    /**
374
     * Registers a JS file.
375
     *
376
     * This method should be used for simple registration of JS files. If you want to use features of
377
     * {@see \Yiisoft\Assets\AssetManager} like appending timestamps to the URL and file publishing options, use
378
     * {@see \Yiisoft\Assets\AssetBundle}.
379
     *
380
     * @param string $url the JS file to be registered.
381
     * @param array $options the HTML attributes for the script tag. The following options are specially handled and
382
     * are not treated as HTML attributes:
383
     *
384
     * - `position`: specifies where the JS script tag should be inserted in a page. The possible values are:
385
     *     * {@see POSITION_HEAD}: in the head section
386
     *     * {@see POSITION_BEGIN}: at the beginning of the body section
387
     *     * {@see POSITION_END}: at the end of the body section. This is the default value.
388
     *
389
     * Please refer to {@see \Yiisoft\Html\Html::jsFile()} for other supported options.
390
     *
391
     * @param string $key the key that identifies the JS script file. If null, it will use $url as the key. If two JS
392
     * files are registered with the same key at the same position, the latter will overwrite the former.
393
     * Note that position option takes precedence, thus files registered with the same key, but different
394
     * position option will not override each other.
395
     *
396
     * @return void
397
     */
398 1
    public function registerJsFile(string $url, array $options = [], string $key = null): void
399
    {
400 1
        $key = $key ?: $url;
401
402 1
        $position = ArrayHelper::remove($options, 'position', self::POSITION_END);
403 1
        $this->jsFiles[$position][$key] = Html::jsFile($url, $options);
404 1
    }
405
406
    /**
407
     * Registers a JS code block defining a variable. The name of variable will be used as key, preventing duplicated
408
     * variable names.
409
     *
410
     * @param string $name Name of the variable
411
     * @param array|string $value Value of the variable
412
     * @param int $position the position in a page at which the JavaScript variable should be inserted.
413
     *
414
     * The possible values are:
415
     *
416
     * - {@see POSITION_HEAD}: in the head section. This is the default value.
417
     * - {@see POSITION_BEGIN}: at the beginning of the body section.
418
     * - {@see POSITION_END}: at the end of the body section.
419
     * - {@see POSITION_LOAD}: enclosed within jQuery(window).load().
420
     *   Note that by using this position, the method will automatically register the jQuery js file.
421
     * - {@see POSITION_READY}: enclosed within jQuery(document).ready().
422
     *   Note that by using this position, the method will automatically register the jQuery js file.
423
     */
424 1
    public function registerJsVar(string $name, $value, int $position = self::POSITION_HEAD): void
425
    {
426 1
        $js = sprintf('var %s = %s;', $name, \Yiisoft\Json\Json::htmlEncode($value));
427 1
        $this->registerJs($js, $position, $name);
428 1
    }
429
430
    public function csrf(): ?string
431
    {
432
        if (!array_key_exists('urlMatcher', $this->getDefaultParameters())) {
433
            return null;
434
        }
435
436
        $urlMatcher = $this->getDefaultParameters()['urlMatcher'];
437
438
        return ($urlMatcher !== null && $urlMatcher->getLastMatchedRequest() !== null)
439
            ? $urlMatcher->getLastMatchedRequest()->getAttribute(Csrf::REQUEST_NAME)
440
            : null;
441
    }
442
443
    /**
444
     * Renders the content to be inserted in the head section.
445
     *
446
     * The content is rendered using the registered meta tags, link tags, CSS/JS code blocks and files.
447
     *
448
     * @return string the rendered content
449
     */
450 4
    protected function renderHeadHtml(): string
451
    {
452 4
        $lines = [];
453 4
        if (!empty($this->metaTags)) {
454
            $lines[] = implode("\n", $this->metaTags);
455
        }
456
457 4
        if (!empty($this->linkTags)) {
458
            $lines[] = implode("\n", $this->linkTags);
459
        }
460 4
        if (!empty($this->cssFiles)) {
461 1
            $lines[] = implode("\n", $this->cssFiles);
462
        }
463 4
        if (!empty($this->css)) {
464
            $lines[] = implode("\n", $this->css);
465
        }
466 4
        if (!empty($this->jsFiles[self::POSITION_HEAD])) {
467 1
            $lines[] = implode("\n", $this->jsFiles[self::POSITION_HEAD]);
468
        }
469 4
        if (!empty($this->js[self::POSITION_HEAD])) {
470 1
            $lines[] = Html::script(implode("\n", $this->js[self::POSITION_HEAD]));
471
        }
472
473 4
        return empty($lines) ? '' : implode("\n", $lines);
474
    }
475
476
    /**
477
     * Renders the content to be inserted at the beginning of the body section.
478
     *
479
     * The content is rendered using the registered JS code blocks and files.
480
     *
481
     * @return string the rendered content
482
     */
483 4
    protected function renderBodyBeginHtml(): string
484
    {
485 4
        $lines = [];
486 4
        if (!empty($this->jsFiles[self::POSITION_BEGIN])) {
487 1
            $lines[] = implode("\n", $this->jsFiles[self::POSITION_BEGIN]);
488
        }
489 4
        if (!empty($this->js[self::POSITION_BEGIN])) {
490
            $lines[] = Html::script(implode("\n", $this->js[self::POSITION_BEGIN]));
491
        }
492
493 4
        return empty($lines) ? '' : implode("\n", $lines);
494
    }
495
496
    /**
497
     * Renders the content to be inserted at the end of the body section.
498
     *
499
     * The content is rendered using the registered JS code blocks and files.
500
     *
501
     * @param bool $ajaxMode whether the view is rendering in AJAX mode. If true, the JS scripts registered at
502
     * {@see POSITION_READY} and {@see POSITION_LOAD} positions will be rendered at the end of the view like normal
503
     * scripts.
504
     *
505
     * @return string the rendered content
506
     */
507 4
    protected function renderBodyEndHtml(bool $ajaxMode): string
508
    {
509 4
        $lines = [];
510
511 4
        if (!empty($this->jsFiles[self::POSITION_END])) {
512 1
            $lines[] = implode("\n", $this->jsFiles[self::POSITION_END]);
513
        }
514
515 4
        if ($ajaxMode) {
516
            $scripts = [];
517
            if (!empty($this->js[self::POSITION_END])) {
518
                $scripts[] = implode("\n", $this->js[self::POSITION_END]);
519
            }
520
            if (!empty($this->js[self::POSITION_READY])) {
521
                $scripts[] = implode("\n", $this->js[self::POSITION_READY]);
522
            }
523
            if (!empty($this->js[self::POSITION_LOAD])) {
524
                $scripts[] = implode("\n", $this->js[self::POSITION_LOAD]);
525
            }
526
            if (!empty($scripts)) {
527
                $lines[] = Html::script(implode("\n", $scripts));
528
            }
529
        } else {
530 4
            if (!empty($this->js[self::POSITION_END])) {
531
                $lines[] = Html::script(implode("\n", $this->js[self::POSITION_END]));
532
            }
533 4
            if (!empty($this->js[self::POSITION_READY])) {
534
                $js = "document.addEventListener('DOMContentLoaded', function(event) {\n" . implode(
535
                    "\n",
536
                    $this->js[self::POSITION_READY]
537
                ) . "\n});";
538
                $lines[] = Html::script($js, ['type' => 'text/javascript']);
539
            }
540 4
            if (!empty($this->js[self::POSITION_LOAD])) {
541
                $js = "window.addEventListener('load', function (event) {\n" . implode(
542
                    "\n",
543
                    $this->js[self::POSITION_LOAD]
544
                ) . "\n});";
545
                $lines[] = Html::script($js, ['type' => 'text/javascript']);
546
            }
547
        }
548
549 4
        return empty($lines) ? '' : implode("\n", $lines);
550
    }
551
552
    /**
553
     * Get title in views.
554
     *
555
     *
556
     * in Layout:
557
     *
558
     * ```php
559
     * <title><?= Html::encode($this->getTitle()) ?></title>
560
     * ```
561
     *
562
     * in Views:
563
     *
564
     * ```php
565
     * $this->setTitle('Web Application - Yii 3.0.');
566
     * ```
567
     *
568
     * @return string
569
     */
570
    public function getTitle(): ?string
571
    {
572
        return $this->title ?? null;
573
    }
574
575
    /**
576
     * It processes the CSS configuration generated by the asset manager and converts it into HTML code.
577
     *
578
     * @param array $cssFiles
579
     * @return void
580
     */
581
    public function setCssFiles(array $cssFiles): void
582
    {
583
        foreach ($cssFiles as $key => $value) {
584
            $this->registerCssFile(
585
                $cssFiles[$key]['url'],
586
                $cssFiles[$key]['attributes']
587
            );
588
        }
589
    }
590
591
    /**
592
     * It processes the JS configuration generated by the asset manager and converts it into HTML code.
593
     *
594
     * @param array $jsFiles
595
     * @return void
596
     */
597
    public function setJsFiles(array $jsFiles): void
598
    {
599
        foreach ($jsFiles as $key => $value) {
600
            $this->registerJsFile(
601
                $jsFiles[$key]['url'],
602
                $jsFiles[$key]['attributes']
603
            );
604
        }
605
    }
606
607
    /**
608
     * Set title in views.
609
     *
610
     * {@see getTitle()}
611
     *
612
     * @param string $value
613
     * @return void
614
     */
615
    public function setTitle($value): void
616
    {
617
        $this->title = $value;
618
    }
619
}
620