fourhundredfour/doctrine-lombok
Composer 安装命令:
composer require fourhundredfour/doctrine-lombok
包简介
A Doctrine library to create getter/setter at runtime with annotations.
README 文档
README
A Doctrine library to create getter/setter at runtime with annotations.
Index
Requirements
- Doctrine
-
=PHP 7.4
Usage
// my_source/Entity/User.php <?php namespace Schischkin\DoctrineLombok\Entity; use Schischkin\DoctrineLombok\Annotations\Getter; use Schischkin\DoctrineLombok\Annotations\Setter; /** @Getter */ class User { /** @Setter */ private $username; private $password; }
// app.php ... $annotation = new Schischkin\DoctrineLombok\Annotation($reader); $classLoader = new Schischkin\DoctrineLombok\ClassLoader(); $classNames = $classLoader->loadClasses(__DIR__ . '/my_source'); foreach ($classNames as $className) { $annotation->parseClassByClassName($className); } $user = new User(); $user->setUsername('fourhundredfour'); echo $user->getUsername(); // Access to the private property
Badges
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache
- 更新时间: 2020-11-12