vasildakov/postcode-doctrine
Composer 安装命令:
composer require vasildakov/postcode-doctrine
包简介
UK Postcode Doctrine Type
关键字:
README 文档
README
Doctrine UK Postcode Type
Installation
The preferred method of installation is via Packagist and Composer. Run
the following command to install the package and add it as a requirement to
your project's composer.json:
composer require vasildakov/postcode-doctrine
Configuration
To configure Doctrine to use vasildakov/postcode as a field type, you'll need to set up the following in your bootstrap:
\Doctrine\DBAL\Types\Type::addType('postcode', 'VasilDakov\Postcode\Doctrine\PostcodeType');
Then, in your models, you may annotate properties by setting the @Column
type to postcode.
/** * @Entity * @Table(name="address") */ class Address { /** * @var \VasilDakov\Postcode\Postcode * @Column(type="postcode") */ protected $postcode; public function getPostcode() { return $this->postcode; } }
Copyright and License
The vasildakov/postcode-doctrine library is copyright © Vasil Dakov and licensed for use under the MIT License (MIT). Please see [LICENSE][] for more information.
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 2
其他信息
- 授权协议: MIT
- 更新时间: 2016-10-03