-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10792 from vpg/issue_10789
Cookie fix #10789
- Loading branch information
Showing
4 changed files
with
160 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
|
||
/* | ||
+------------------------------------------------------------------------+ | ||
| Phalcon Framework | | ||
+------------------------------------------------------------------------+ | ||
| Copyright (c) 2011-2015 Phalcon Team (http://www.phalconphp.com) | | ||
+------------------------------------------------------------------------+ | ||
| This source file is subject to the New BSD License that is bundled | | ||
| with this package in the file docs/LICENSE.txt. | | ||
| | | ||
| If you did not receive a copy of the license and are unable to | | ||
| obtain it through the world-wide-web, please send an email | | ||
| to license@phalconphp.com so we can send you a copy immediately. | | ||
+------------------------------------------------------------------------+ | ||
| Authors: Olivier Garbe <ogarbe@voyageprive.com | | ||
+------------------------------------------------------------------------+ | ||
*/ | ||
|
||
namespace Phalcon\Http; | ||
|
||
/** | ||
* Phalcon\Http\CookieInterface | ||
* | ||
* Interface for Phalcon\Http\Cookie | ||
*/ | ||
interface CookieInterface | ||
{ | ||
/** | ||
* Sets the cookie's value | ||
* | ||
* @param string value | ||
* @return \Phalcon\Http\CookieInterface | ||
*/ | ||
public function setValue(value) -> <CookieInterface>; | ||
|
||
/** | ||
* Returns the cookie's value | ||
* | ||
* @param string|array filters | ||
* @param string defaultValue | ||
* @return mixed | ||
*/ | ||
public function getValue(filters = null, defaultValue = null); | ||
|
||
/** | ||
* Sends the cookie to the HTTP client | ||
*/ | ||
public function send() -> <CookieInterface>; | ||
|
||
/** | ||
* Deletes the cookie | ||
*/ | ||
public function delete(); | ||
|
||
/** | ||
* Sets if the cookie must be encrypted/decrypted automatically | ||
*/ | ||
public function useEncryption(boolean useEncryption) -> <CookieInterface>; | ||
|
||
/** | ||
* Check if the cookie is using implicit encryption | ||
*/ | ||
public function isUsingEncryption() -> boolean; | ||
|
||
/** | ||
* Sets the cookie's expiration time | ||
*/ | ||
public function setExpiration(int expire) -> <CookieInterface>; | ||
|
||
/** | ||
* Returns the current expiration time | ||
*/ | ||
public function getExpiration() -> string; | ||
|
||
/** | ||
* Sets the cookie's expiration time | ||
*/ | ||
public function setPath(string! path) -> <CookieInterface>; | ||
|
||
/** | ||
* Returns the current cookie's name | ||
*/ | ||
public function getName() -> string; | ||
|
||
/** | ||
* Returns the current cookie's path | ||
*/ | ||
public function getPath() -> string; | ||
|
||
/** | ||
* Sets the domain that the cookie is available to | ||
*/ | ||
public function setDomain(string! domain) -> <CookieInterface>; | ||
|
||
/** | ||
* Returns the domain that the cookie is available to | ||
*/ | ||
public function getDomain() -> string; | ||
|
||
/** | ||
* Sets if the cookie must only be sent when the connection is secure (HTTPS) | ||
*/ | ||
public function setSecure(boolean secure) -> <CookieInterface>; | ||
|
||
/** | ||
* Returns whether the cookie must only be sent when the connection is secure (HTTPS) | ||
*/ | ||
public function getSecure() -> boolean; | ||
|
||
/** | ||
* Sets if the cookie is accessible only through the HTTP protocol | ||
*/ | ||
public function setHttpOnly(boolean httpOnly) -> <CookieInterface>; | ||
|
||
/** | ||
* Returns if the cookie is accessible only through the HTTP protocol | ||
*/ | ||
public function getHttpOnly() -> boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters