2017 © Pedro Peláez
 

library postcode-doctrine

UK Postcode Doctrine Type

image

vasildakov/postcode-doctrine

UK Postcode Doctrine Type

  • Friday, October 7, 2016
  • by vasildakov
  • Repository
  • 2 Watchers
  • 3 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 3 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Doctrine UK Postcode Type

Doctrine UK Postcode Type, (*1)

Build Status Coverage Status HHVM Status Scrutinizer Code Quality Latest Stable Version Total Downloads License, (*2)

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:, (*3)

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:, (*4)

``` php \Doctrine\DBAL\Types\Type::addType('postcode', 'VasilDakov\Postcode\Doctrine\PostcodeType');, (*5)


Then, in your models, you may annotate properties by setting the `@Column` type to `postcode`. ``` php /** * @Entity * @Table(name="address") */ class Address { /** * @var \VasilDakov\Postcode\Postcode * @Column(type="postcode") */ protected $postcode; public function getPostcode() { return $this->postcode; } }

The vasildakov/postcode-doctrine library is copyright © Vasil Dakov and licensed for use under the MIT License (MIT). Please see [LICENSE][] for more information., (*6)

The Versions