kayladnls/doctrine-additions
最新稳定版本:0.2.0
Composer 安装命令:
composer require kayladnls/doctrine-additions
包简介
Additional Doctrine Types and helpers
README 文档
README
This library offers a custom UrlType for Doctrine 2, based on league/url.
For additional information on custom doctrine types see here.
Usage:
In your Bootstrap file:
use Doctrine\DBAL\Types\Type;
Type::addType('url', Kayladnls\DoctrineAdditions\Type\UrlType::class);
Register the type with your connection:
$conn = $em->getConnection();
$conn->getDatabasePlatform()->registerDoctrineTypeMapping('varchar', 'url');
Use The type in your entity:
class MyEntity
{
/** @Column(type="url") */
private $link;
}
Attributions
Inspired by beberlei/DoctrineExtensions
统计信息
- 总下载量: 15.66k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-09