-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added get_header method to Output class. #645
Conversation
I have a hook that overrides the final output. The hook needs to check if the Content-Type header has been sent. There was no way to access header information that had already been sent via: $this->output->set_header(); The method will send back headers set by the Output class, or using the traditional header() function. |
Seems like an excellent addition to me. |
Loved it! even yesterday I was making a rss feed and this would be of great help to me :P |
Any traction on this? or should it be closed? |
@garthkerr this misses a changelog entry and user guide documentation. |
@petsagouris I have added the documentation and changelog. |
@garthkerr thanks, a repo collaborator should review this now ;) //cc @narfbg |
* For an individual header, the value is returned. For an array | ||
* of headers, a key-value array is returned. | ||
* | ||
* @access public |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed.
Bump? |
$value = trim($header_array[1]); | ||
|
||
// Add new or replace existing when specified | ||
if ( ! isset($headers[$field]) || $output_header[1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
||
must be changed to OR
, as per the style guide.
You'll also need to sync with the repo as it's currently in conflict. Poke me after you're done as commits don't issue notifications, so I didn't see the previous one as well. |
(an improved version of PR #645) Also fixed get_content_type() to only return the MIME value and created Output library unit tests for both of these methods.
See the above commit. |
(an improved version of PR bcit-ci#645) Also fixed get_content_type() to only return the MIME value and created Output library unit tests for both of these methods.
No description provided.