Documentation

unpack

array public
\Bitrix\Main\Security\Sign\TimeSigner::unpack(
 string $value,
 integer $limit = 2
);

Non-static method unpacks values from string (similar to rsplit).

Parameters

ParameterDescriptionVersion
$valueString for unpacking.
$limitWhen $limit === 0 - unpacks all values, by default - 2.

Exceptions

Example

Standard examples for separator ".":

 // Unpack all values:
 unpack('test.all.values', 0) -> ['test', 'all', 'values']

 // Unpack 2 values (by default). First element containing the rest of string.
 unpack('test.all.values') -> ['test.all', 'values']

 // Exception if separator is missing
 unpack('test.all values', 3) -> throws BadSignatureException



© «Bitrix24», 2001-2022
Up