Skip to content

Commit

Permalink
Merge pull request phalcon#12003 from niden/2.1.x
Browse files Browse the repository at this point in the history
Renamed isSoapRequest to isSoap and isSecureRequest to isSecure
  • Loading branch information
sergeyklay authored Jul 21, 2016
2 parents 6fd154a + e45e5da commit 86439dd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
- Fixed `Phalcon\Forms\Form::getValue`. Now Elements can have names that match with the internal Form getters [#10398](https://github.com/phalcon/cphalcon/issues/10398)
- Add `setContentLength()` method to `Phalcon\Http\Response`
- Fixed `Phalcon\Mvc\Model\Manager::_mergeFindParameters` - Merging conditions [#11987](https://github.com/phalcon/cphalcon/issues/11987)
- Renamed `Phalcon\Http\Request::isSoapRequest` to `Phalcon\Http\Request::isSoap` and `Phalcon\Http\Request::isSecureRequest` to `Phalcon\Http\Request::isSecure`. Left the originals functions as aliases and marked them deprecated.

# [2.0.13](https://github.com/phalcon/cphalcon/releases/tag/phalcon-v2.0.13) (2016-05-19)
- Restored `Phalcon\Text::camelize` behavior [#11767](https://github.com/phalcon/cphalcon/issues/11767)
Expand Down
20 changes: 18 additions & 2 deletions phalcon/http/request.zep
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ class Request implements RequestInterface, InjectionAwareInterface
/**
* Checks whether request has been made using SOAP
*/
public function isSoapRequested() -> boolean
public function isSoap() -> boolean
{
var contentType;

Expand All @@ -323,14 +323,30 @@ class Request implements RequestInterface, InjectionAwareInterface
return false;
}

/**
* Alias of isSoap(). It will be deprecated in future versions
*/
deprecated public function isSoapRequested() -> boolean
{
return this->isSoap();
}

/**
* Checks whether request has been made using any secure layer
*/
public function isSecureRequest() -> boolean
public function isSecure() -> boolean
{
return this->getScheme() === "https";
}

/**
* Alias of isSecure(). It will be deprecated in future versions
*/
deprecated public function isSecureRequest() -> boolean
{
return this->isSecure();
}

/**
* Gets HTTP raw request body
*/
Expand Down

0 comments on commit 86439dd

Please sign in to comment.