ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
StringUtil.php
Go to the documentation of this file.
1<?php
2
3namespace Dflydev\FigCookies;
4
6{
7 public static function splitOnAttributeDelimiter($string)
8 {
9 return array_filter(preg_split('@\s*[;]\s*@', $string));
10 }
11
12 public static function splitCookiePair($string)
13 {
14 $pairParts = explode('=', $string, 2);
15
16 if (count($pairParts) === 1) {
17 $pairParts[1] = '';
18 }
19
20 return array_map(function ($part) {
21 return urldecode($part);
22 }, $pairParts);
23 }
24}
An exception for terminatinating execution or to throw for unit testing.
static splitCookiePair($string)
Definition: StringUtil.php:12
static splitOnAttributeDelimiter($string)
Definition: StringUtil.php:7