承接 initphp/cookies 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

initphp/cookies

最新稳定版本:1.1

Composer 安装命令:

composer require initphp/cookies

包简介

InitPHP Cookie Manager

README 文档

README

This library aims to make cookies easier to manage and a little bit more secure. It signs cookies with a (secret) salt and prevents data from being modified by the user.

Requirements

Installation

composer require initphp/cookies

Configuration

$options = [
        'ttl'       => 2592000, // 30 days
        'path'      => '/',
        'domain'    => null,
        'secure'    => false,
        'httponly'  => true,
        'samesite'  => 'Strict'
];

Usage

require_once __DIR__ . "/vendor/autoload.php";
use InitPHP\Cookies\Cookie;

$cookie = new Cookie('cookie_name', 's£cr£t_s@lt', []);
$cookie->set('username', 'sdd');

Methods

public function has(string $key): bool;
public function get(string $key, $default = null): mixed;
public function pull(string $key, $default = null): mixed;
public function set(string $key, string|bool|int|float $value, ?int $ttl = null): self;
public function setArray(string[] $assoc, ?int $ttl = null): self;
public function remove(string ...$key): bool;
public function push(set $key, string|bool|int|float $value, ?int $ttl = null): string|bool|int|float;
public function all(): array;
public function flush(): bool;
public function destroy(): bool;

Credits

License

Copyright © 2022 MIT License

统计信息

  • 总下载量: 84
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固