/** * HeaderBag constructor. * * @param array $headers */ public function __construct(array $headers) { $bag = []; $self = $this; array_walk($headers, function ($value, $key) use(&$bag, $self) { $value = explode(',', $value); $self->headers[$key] = $value; $key = str_replace(['http_', '_'], ['', '-'], strtolower($key)); $bag[$key] = $value; }); parent::__construct($bag); }
/** * ServerAttribute constructor. * @param array $bag */ public function __construct(array $bag) { parent::__construct($bag); }