public function __construct() { if (function_exists('getallheaders')) { $headers = getallheaders(); } else { $headers = $this->getAllHeaders(); } $this->headerBag = $this->arr($headers); }