‪TYPO3CMS  ‪main
ConditionLine.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 
22 
28 final class ‪ConditionLine extends ‪AbstractLine
29 {
31 
32  public function ‪setValueToken(‪Token $token): static
33  {
34  if ($token->‪getType() !== TokenType::T_VALUE) {
35  throw new \LogicException('Token must be of type T_VALUE', 1655823705);
36  }
37  $this->valueToken = $token;
38  return $this;
39  }
40 
41  public function ‪getTokenValue(): ‪Token
42  {
43  return ‪$this->valueToken;
44  }
45 }
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Line
Definition: AbstractLine.php:18
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Token\Token
Definition: Token.php:29
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Line\ConditionLine\$valueToken
‪Token $valueToken
Definition: ConditionLine.php:30
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Token\TokenType
‪TokenType
Definition: TokenType.php:26
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Line\AbstractLine
Definition: AbstractLine.php:28
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Line\ConditionLine\setValueToken
‪setValueToken(Token $token)
Definition: ConditionLine.php:32
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Line\ConditionLine\getTokenValue
‪getTokenValue()
Definition: ConditionLine.php:41
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Line\ConditionLine
Definition: ConditionLine.php:29
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Token\AbstractToken\getType
‪getType()
Definition: AbstractToken.php:60