‪TYPO3CMS  ‪main
IndexingDataAsArray.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 
26 {
27  public function ‪__construct(
28  public array $title = [],
29  public array $body = [],
30  public array $keywords = [],
31  public array $description = [],
32  ) {}
33 
37  public static function ‪fromArray(array $input): ‪IndexingDataAsArray
38  {
39  return new ‪IndexingDataAsArray(
40  $input['title'] ?? [],
41  $input['body'] ?? [],
42  $input['keywords'] ?? [],
43  $input['description'] ?? [],
44  );
45  }
46 
47  public function ‪toArray(): array
48  {
49  return get_object_vars($this);
50  }
51 }
‪TYPO3\CMS\IndexedSearch\Dto\IndexingDataAsArray\__construct
‪__construct(public array $title=[], public array $body=[], public array $keywords=[], public array $description=[],)
Definition: IndexingDataAsArray.php:27
‪TYPO3\CMS\IndexedSearch\Dto\IndexingDataAsArray\fromArray
‪static fromArray(array $input)
Definition: IndexingDataAsArray.php:37
‪TYPO3\CMS\IndexedSearch\Dto
Definition: IndexingDataAsArray.php:18
‪TYPO3\CMS\IndexedSearch\Dto\IndexingDataAsArray\toArray
‪toArray()
Definition: IndexingDataAsArray.php:47
‪TYPO3\CMS\IndexedSearch\Dto\IndexingDataAsArray
Definition: IndexingDataAsArray.php:26