brazanation/document-doctrine-types
Composer 安装命令:
composer require brazanation/document-doctrine-types
包简介
Library to provide Document as Doctrine Types
README 文档
README
Installation
composer require brazanation/document-doctrine-types ^0.1
How to Use?
First of all, register the Document Types after Doctrine Connection.
// bootstrap.php // ... other code $connection = \Doctrine\DBAL\DriverManager::getConnection($conn, $config, new \Doctrine\Common\EventManager()); \Brazanation\Doctrine\TypeExtension::register($connection); // ... more code
Define the entity's property as the document
/** * @Entity @Table(name="persons") */ class Person { /** * @Id * @Column(type="cpf") * @var \Brazanation\Documents\Cpf */ private $cpf; public function __construct(\Brazanation\Documents\Cpf $cpf) { $this->cpf = $cpf; } public function getCpf() { return $this->cpf; } }
Available Types
| Type Name | Description |
|---|---|
| cnh | National Driving License |
| cnpj | Company Identification or National Register of Legal Entities |
| cns | National Health Card |
| cpf | Registration of individuals or Tax Identification |
| pispasep | Social Integration Program and Training Program of the Heritage of Public Servant |
| renavam | National Registry of Motor Vehicles |
统计信息
- 总下载量: 26
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-08-09