orkestra/common
最新稳定版本:1.0.3
Composer 安装命令:
composer require orkestra/common
包简介
Provides common functionality useful for Doctrine 2 based projects
README 文档
README
Provides useful functionality for any Doctrine 2 based project including:
- Transparent user/server timezone conversion
- Encrypted string fields
- Enumerations
Installation
The easiest way to add orkestra-common to your project is using composer.
Add orkestra-common to your composer.json file:
{
"require": {
"orkestra/common": "dev-master"
}
}
Then run composer install or composer update.
Configuration
Each feature provided by common requires a bit of set up.
Dates and Times
Orkestra's custom DateTime implementation allows for easier conversion between server and user time, without the need for a full-blown localization or internationalization implementation.
# /path/to/your/bootstrap.php <?php use Doctrine\DBAL\Types\Type; // DateTime types Type::overrideType('datetime', 'Orkestra\Common\DbalType\DateTimeType'); Type::overrideType('date', 'Orkestra\Common\DbalType\DateType');
Encrypted string fields
The encrypted_string field type transparently encrypts and decrypts data when persisting and hydrating entities.
Enumerations
Enumerations are not supported by PHP nor Doctrine 2 out of the box. Common provides a base class for your own custom enumeration implementations. Each enumeration requires the enumeration itself and a corresponding DbalType class to integrate the enumeration with Doctrine 2.
统计信息
- 总下载量: 1.41k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 6
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-12-31