-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* new cookie * optimize set cookie method * fix error * optimize code * optimize code * refactor * optimize code * optimize code [2] --------- Co-authored-by: NathanFreeman <[email protected]> Co-authored-by: MARiA so cute <[email protected]>
- Loading branch information
1 parent
5ba0700
commit b21b8d9
Showing
21 changed files
with
924 additions
and
174 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
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,19 @@ | ||
<?php | ||
namespace Swoole\Http { | ||
class Cookie { | ||
public function __construct(bool $encode = true) {} | ||
public function withName(string $name): \Swoole\Http\Cookie {} | ||
public function withValue(string $value = ''): \Swoole\Http\Cookie {} | ||
public function withExpires(int $expires = 0): \Swoole\Http\Cookie {} | ||
public function withPath(string $path = '/'): \Swoole\Http\Cookie {} | ||
public function withDomain(string $domain = ''): \Swoole\Http\Cookie {} | ||
public function withSecure(bool $secure = false): \Swoole\Http\Cookie {} | ||
public function withHttpOnly(bool $httpOnly = false): \Swoole\Http\Cookie {} | ||
public function withSameSite(string $sameSite = ''): \Swoole\Http\Cookie {} | ||
public function withPriority(string $priority = ''): \Swoole\Http\Cookie {} | ||
public function withPartitioned(bool $partitioned = false): \Swoole\Http\Cookie {} | ||
public function toArray(): array {} | ||
public function toString(): string | false {} | ||
public function reset(): void {} | ||
} | ||
} |
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,55 @@ | ||
/* This is a generated file, edit the .stub.php file instead. | ||
* Stub hash: a11e74ea8b1a4c77a3c10fbfbd94775c504ba812 */ | ||
|
||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Swoole_Http_Cookie___construct, 0, 0, 0) | ||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encode, _IS_BOOL, 0, "true") | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Swoole_Http_Cookie_withName, 0, 1, Swoole\\Http\\Cookie, 0) | ||
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Swoole_Http_Cookie_withValue, 0, 0, Swoole\\Http\\Cookie, 0) | ||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 0, "\'\'") | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Swoole_Http_Cookie_withExpires, 0, 0, Swoole\\Http\\Cookie, 0) | ||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, expires, IS_LONG, 0, "0") | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Swoole_Http_Cookie_withPath, 0, 0, Swoole\\Http\\Cookie, 0) | ||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, path, IS_STRING, 0, "\'/\'") | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Swoole_Http_Cookie_withDomain, 0, 0, Swoole\\Http\\Cookie, 0) | ||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, domain, IS_STRING, 0, "\'\'") | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Swoole_Http_Cookie_withSecure, 0, 0, Swoole\\Http\\Cookie, 0) | ||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, secure, _IS_BOOL, 0, "false") | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Swoole_Http_Cookie_withHttpOnly, 0, 0, Swoole\\Http\\Cookie, 0) | ||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, httpOnly, _IS_BOOL, 0, "false") | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Swoole_Http_Cookie_withSameSite, 0, 0, Swoole\\Http\\Cookie, 0) | ||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sameSite, IS_STRING, 0, "\'\'") | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Swoole_Http_Cookie_withPriority, 0, 0, Swoole\\Http\\Cookie, 0) | ||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, priority, IS_STRING, 0, "\'\'") | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Swoole_Http_Cookie_withPartitioned, 0, 0, Swoole\\Http\\Cookie, 0) | ||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, partitioned, _IS_BOOL, 0, "false") | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Swoole_Http_Cookie_toArray, 0, 0, IS_ARRAY, 0) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Swoole_Http_Cookie_toString, 0, 0, MAY_BE_STRING|MAY_BE_FALSE) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Swoole_Http_Cookie_reset, 0, 0, IS_VOID, 0) | ||
ZEND_END_ARG_INFO() |
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
Oops, something went wrong.