aichadigital/lara-privacy-core 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

aichadigital/lara-privacy-core

Composer 安装命令:

composer require aichadigital/lara-privacy-core

包简介

Dependency-free GDPR core for lara-privacy: the LegallyRetainable contract and a pure legal-hold decision (no Eloquent, no side effects, no jurisdiction).

README 文档

README

The dependency-free, framework-free core of lara-privacy: a universal contract for legal data-retention obligations and a pure decision over it.

No Eloquent, no side effects, no jurisdiction, no domain assumptions. A domain package (billing, medical, HR…) implements the contract; the privacy layer reads it to decide whether a record may be touched.

Governing rule: lara-privacy defines privacy contracts. Domain packages implement them. No domain package — and no jurisdiction — defines the shape of the core.

Install

composer require aichadigital/lara-privacy-core

Requires PHP 8.3+. That is the only requirement — there are no runtime dependencies.

What it ships

  • Contracts\LegallyRetainable — one method, retainedUntil(): ?DateTimeInterface: the instant until which an object must be kept, or null when it carries no retention obligation.
  • CheckLegalHold — a pure, clock-injected decision: is a subject under an active retention hold at a given $now? (retainedUntil > now).

Quick example

use AichaDigital\LaraPrivacyCore\Contracts\LegallyRetainable;
use AichaDigital\LaraPrivacyCore\CheckLegalHold;
use DateTimeImmutable;
use DateTimeInterface;

final class AccountingDocument implements LegallyRetainable
{
    public function __construct(
        private readonly ?DateTimeImmutable $fiscalYearEnd, // null = not booked
        private readonly int $years,
    ) {}

    public function retainedUntil(): ?DateTimeInterface
    {
        return $this->fiscalYearEnd?->modify("+{$this->years} years");
    }
}

$held = (new CheckLegalHold)->isUnderRetention($document, new DateTimeImmutable);

Documentation

The Laravel integration (the read-only hold gate, jurisdictional retention presets, and worked adapters) lives in the aichadigital/lara-privacy package.

License

MIT. See LICENSE.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固