‪TYPO3CMS  ‪main
IndexingDataAsString.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
24 {
25  public function ‪__construct(
26  public string $title = '',
27  public string $body = '',
28  public string $keywords = '',
29  public string $description = '',
30  ) {}
31 
35  public static function ‪fromArray(array $input): ‪IndexingDataAsString
36  {
37  return new ‪IndexingDataAsString(
38  $input['title'] ?? '',
39  $input['body'] ?? '',
40  $input['keywords'] ?? '',
41  $input['description'] ?? '',
42  );
43  }
44 
45  public function ‪toArray(): array
46  {
47  return get_object_vars($this);
48  }
49 }
‪TYPO3\CMS\IndexedSearch\Dto\IndexingDataAsString\__construct
‪__construct(public string $title='', public string $body='', public string $keywords='', public string $description='',)
Definition: IndexingDataAsString.php:25
‪TYPO3\CMS\IndexedSearch\Dto\IndexingDataAsString\fromArray
‪static fromArray(array $input)
Definition: IndexingDataAsString.php:35
‪TYPO3\CMS\IndexedSearch\Dto\IndexingDataAsString
Definition: IndexingDataAsString.php:24
‪TYPO3\CMS\IndexedSearch\Dto\IndexingDataAsString\toArray
‪toArray()
Definition: IndexingDataAsString.php:45
‪TYPO3\CMS\IndexedSearch\Dto
Definition: IndexingDataAsArray.php:18