2017 © Pedro Peláez
 

library document-doctrine-types

Library to provide Document as Doctrine Types

image

brazanation/document-doctrine-types

Library to provide Document as Doctrine Types

  • Saturday, February 17, 2018
  • by tonicospinelli
  • Repository
  • 1 Watchers
  • 3 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Doctrine Types for Brazilian Documents

Build Status StyleCI Scrutinizer Code Quality Code Coverage, (*1)

Installation

composer require brazanation/document-doctrine-types ^0.1

How to Use?

First of all, register the Document Types after Doctrine Connection., (*2)

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

/**
 * @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

The Versions

17/02 2018

dev-master

9999999-dev

Library to provide Document as Doctrine Types

  Sources   Download

MIT

The Requires

 

The Development Requires

11/08 2017

v0.1.0

0.1.0.0

Library to provide Document as Doctrine Types

  Sources   Download

MIT

The Requires

 

The Development Requires