‪TYPO3CMS  ‪main
AbstractSoftReferenceParser.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  protected string ‪$tokenID_basePrefix = '';
26  protected string ‪$parserKey = '';
27  protected array ‪$parameters = [];
28 
35  public function ‪makeTokenID(string $index = ''): string
36  {
37  return md5($this->tokenID_basePrefix . ':' . $index);
38  }
39 
44  public function ‪setParserKey(string ‪$parserKey, array ‪$parameters): void
45  {
46  $this->parserKey = ‪$parserKey;
47  $this->parameters = ‪$parameters;
48  }
49 
50  public function ‪getParserKey(): string
51  {
52  return ‪$this->parserKey;
53  }
54 
55  protected function ‪setTokenIdBasePrefix(string $table, string ‪$uid, string $field, string $structurePath): void
56  {
57  $this->tokenID_basePrefix = implode(':', [$table, ‪$uid, $field, $structurePath, $this->‪getParserKey()]);
58  }
59 }
‪TYPO3\CMS\Core\DataHandling\SoftReference\AbstractSoftReferenceParser\setTokenIdBasePrefix
‪setTokenIdBasePrefix(string $table, string $uid, string $field, string $structurePath)
Definition: AbstractSoftReferenceParser.php:55
‪TYPO3\CMS\Core\DataHandling\SoftReference\AbstractSoftReferenceParser\$tokenID_basePrefix
‪string $tokenID_basePrefix
Definition: AbstractSoftReferenceParser.php:25
‪TYPO3\CMS\Core\DataHandling\SoftReference\AbstractSoftReferenceParser\getParserKey
‪getParserKey()
Definition: AbstractSoftReferenceParser.php:50
‪TYPO3\CMS\Core\DataHandling\SoftReference\AbstractSoftReferenceParser\$parserKey
‪string $parserKey
Definition: AbstractSoftReferenceParser.php:26
‪TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserInterface
Definition: SoftReferenceParserInterface.php:31
‪TYPO3\CMS\Core\DataHandling\SoftReference
Definition: AbstractSoftReferenceParser.php:18
‪TYPO3\CMS\Webhooks\Message\$uid
‪identifier readonly int $uid
Definition: PageModificationMessage.php:35
‪TYPO3\CMS\Core\DataHandling\SoftReference\AbstractSoftReferenceParser\$parameters
‪array $parameters
Definition: AbstractSoftReferenceParser.php:27
‪TYPO3\CMS\Core\DataHandling\SoftReference\AbstractSoftReferenceParser\makeTokenID
‪string makeTokenID(string $index='')
Definition: AbstractSoftReferenceParser.php:35
‪TYPO3\CMS\Core\DataHandling\SoftReference\AbstractSoftReferenceParser
Definition: AbstractSoftReferenceParser.php:24
‪TYPO3\CMS\Core\DataHandling\SoftReference\AbstractSoftReferenceParser\setParserKey
‪setParserKey(string $parserKey, array $parameters)
Definition: AbstractSoftReferenceParser.php:44