Skip to content
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

Open
wants to merge 2 commits into
base: 3.4/develop
Choose a base branch
from
Open

Added convenience methods for request type checking #417

wants to merge 2 commits into from

Conversation

marklocker
Copy link

Added convenience methods for the four most common request types.

Related issue: http://dev.kohanaframework.org/issues/4606

Convenience methods for the four most common request types.
else
{
return FALSE;
}
Copy link
Contributor

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)

Copy link

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)

Copy link
Contributor

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)

Copy link
Contributor

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.

@marklocker
Copy link
Author

Quite right - a little too concerned with adhering to Kohana's "braces on new lines" guideline I think!

@zeelot
Copy link
Member

zeelot commented Dec 30, 2013

There seem to be merge conflicts here, could you merge the latest 3.4/develop into your branch? Also, can we add unit tests for this? It should be simple enough.

@enov enov added this to the 3.4.0 milestone Nov 21, 2014
@neo22s
Copy link
Member

neo22s commented Mar 21, 2016

I like this for 4.0.0 but needs to be done manually.

@neo22s neo22s modified the milestones: 4.0.0, 3.4.0 Mar 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants