-
Notifications
You must be signed in to change notification settings - Fork 327
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 convenience methods for request type checking #417
base: 3.4/develop
Are you sure you want to change the base?
Added convenience methods for request type checking #417
Conversation
Convenience methods for the four most common request types.
else | ||
{ | ||
return FALSE; | ||
} |
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.
return ($this->method() === HTTP_Request::POST)
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.
return ($this->_method === HTTP_Request::POST)
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.
@birkir yep, you're right, but canonical
return (HTTP_Request::POST === $this->_method)
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.
Are the parentheses needed here?
Edit: Nevermind, I see that this is the style follow through the rest of the file.
Quite right - a little too concerned with adhering to Kohana's "braces on new lines" guideline I think! |
There seem to be merge conflicts here, could you merge the latest |
I like this for 4.0.0 but needs to be done manually. |
Added convenience methods for the four most common request types.
Related issue: http://dev.kohanaframework.org/issues/4606