‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Domain\ConsumableString Class Reference
Inheritance diagram for TYPO3\CMS\Core\Domain\ConsumableString:

Public Member Functions

 __construct (string $value)
 __toString ()
 count ()
 consume ()

Public Attributes

readonly string $value

Private Attributes

int $counter = 0

Detailed Description

String wrapper that keeps track of how often the value was consumed. This can be used to make decisions during runtime, depending on whether a provided value actually has been used (e.g. in rendered content).

Definition at line 25 of file ConsumableString.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Domain\ConsumableString::__construct ( string  $value)

Member Function Documentation

◆ __toString()

TYPO3\CMS\Core\Domain\ConsumableString::__toString ( )

◆ consume()

TYPO3\CMS\Core\Domain\ConsumableString::consume ( )

◆ count()

TYPO3\CMS\Core\Domain\ConsumableString::count ( )

Member Data Documentation

◆ $counter

int TYPO3\CMS\Core\Domain\ConsumableString::$counter = 0

Definition at line 31 of file ConsumableString.php.

Referenced by TYPO3\CMS\Core\Domain\ConsumableString\count().

◆ $value

readonly string TYPO3\CMS\Core\Domain\ConsumableString::$value