Icicle\Http\Message\Cookie\BasicCookie::fromHeader PHP Метод

fromHeader() публичный статический Метод

public static fromHeader ( string $string ) : Icicle\Http\Message\Cookie\Cookie
$string string Valid Set-Cookie header line.
Результат Icicle\Http\Message\Cookie\Cookie
    public static function fromHeader(string $string) : Cookie
    {
        $parts = array_map('trim', explode('=', $string, 2));
        if (2 !== count($parts)) {
            throw new InvalidValueException('Invalid cookie header format.');
        }
        list($name, $value) = $parts;
        return new self($name, $value);
    }