百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

DoctrineBehaviors

> 数据库
开源

Doctrine2 中的行为特性可帮助处理 Blameable、Loggable、Sluggable、SoftDeletable、Uuidable、Timestampable、Translatable 和 Tree 行为

923 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Doctrine2 中的行为特性可帮助处理 Blameable、Loggable、Sluggable、SoftDeletable、Uuidable、Timestampable、Translatable 和 Tree 行为

Doctrine Behaviors

This PHP library is a collection of traits and interfaces that add behaviors to Doctrine entities and repositories.

It currently handles:

  • Blameable
  • Loggable
  • Sluggable
  • SoftDeletable
  • Uuidable
  • Timestampable
  • Translatable
  • Tree

Install

bash
composer require knplabs/doctrine-behaviors

Usage

All you have to do is to define a Doctrine entity:

  • implemented interface
  • add a trait

For some behaviors like tree, you can use repository traits:

php
import(DoctrineSetList::DOCTRINE_BEHAVIORS_20);
};

Run Rector:

bash
vendor/bin/rector process src

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPbehaviordoctrinedoctrine2orm

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库