-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cookie facade, helper fucntion, Cookie gets/sets
- Loading branch information
Showing
7 changed files
with
216 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Magnetar\Helpers\Facades; | ||
|
||
use Magnetar\Helpers\Facades\Facade; | ||
|
||
/** | ||
* @method importCookiesFromRequest(Magnetar\Http\Request $request): void | ||
* @method getCookies(): array | ||
* @method getQueuedCookies(): array | ||
* @method get(string $name): ?Magnetar\Http\CookieJar\Cookie | ||
* @method getValue(string $name): ?string | ||
* @method set(string $name, string $value, ?int $expires_seconds=null, ?string $path=null, ?string $domain=null, ?bool $secure=null, ?bool $httponly=null): self | ||
* @method setCookie(Magnetar\Http\CookieJar\Cookie $cookie): self | ||
* @method remove(string $name): self | ||
* @method setDefaults(?int $expires_seconds=null, ?string $path=null, ?string $domain=null, ?bool $secure=null, ?bool $httponly=null): self | ||
* @method getDefaultExpiresSeconds(): int | ||
* @method getDefaultPath(): string | ||
* @method getDefaultDomain(): string | ||
* @method getDefaultSecure(): bool | ||
* @method getDefaultHttpOnly(): bool | ||
* | ||
* @see \Magnetar\Http\CookieJar\CookieJar | ||
*/ | ||
class Cookie extends Facade { | ||
/** | ||
* Get the named key that this facade represents | ||
* @return string | ||
*/ | ||
protected static function getFacadeKey(): string { | ||
return 'cookie'; | ||
} | ||
} |
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
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