2017 © Pedro Peláez
 

symfony-bundle inn-kpp-bundle

Symfony Inn Kpp ORM Entity validator

image

laxcorp/inn-kpp-bundle

Symfony Inn Kpp ORM Entity validator

  • Thursday, December 21, 2017
  • by LaxCorp
  • Repository
  • 1 Watchers
  • 0 Stars
  • 324 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 29 % Grown

The README.md

INN + KPP validation for ORM Entity

Install

composer require laxcorp/inn-kpp-bundle, (*1)

Add in app/AppKernel.php

$bundles = [
    new LaxCorp\InnKppBundle\InnKppBundle()
]

Use in field (Inn only)

use LaxCorp\InnKppBundle\Validator\Constraints\Inn as AssertInn;

....

/**
 * @var string|null
 *
 * @ORM\Column(name="inn", type="string", length=255, nullable=true)
 * @AssertInn
 */
private $inn;

Use in Entity

use LaxCorp\InnKppBundle\Validator\Constraints\InnKppEntity;
/**
 *
 * @ORM\Entity
 *
 * @InnKppEntity(
 *     fieldInn="inn",
 *     fieldKpp="kpp",
 *     ignoreNull=true
 * )
 */
 class ...

Example AppBundle/Entity/Company.php

```php <?php, (*2)

namespace AppBundle\Entity;, (*3)

use Doctrine\ORM\Mapping as ORM; use LaxCorp\InnKppBundle\Validator\Constraints\InnKppEntity;, (*4)

/** * * @ORM\Entity * * @InnKppEntity( * fieldInn="inn", * fieldKpp="kpp", * ignoreNull=true * ) */ class Company {, (*5)

/**
 * @var string
 *
 * @ORM\Column(type="string", length=255, nullable=true)
 */
private $inn;

/**
 * @var string
 *
 * @ORM\Column(type="string", length=255, nullable=true)
 */
private $kpp;

/**
 * Set inn
 *
 * @param string $inn
 *
 * @return Company
 */
public function setInn($inn)
{
    $this->inn = $inn;

    return $this;
}

/**
 * Get inn
 *
 * @return string
 */
public function getInn()
{
    return $this->inn;
}

/**
 * Set kpp
 *
 * @param string $kpp
 *
 * @return Company
 */
public function setKpp($kpp)
{
    $this->kpp = $kpp;

    return $this;
}

/**
 * Get kpp
 *
 * @return string
 */
public function getKpp()
{
    return $this->kpp;
}

} ````, (*6)

The Versions

21/12 2017

dev-master

9999999-dev https://github.com/LaxCorp/InnKppBundle

Symfony Inn Kpp ORM Entity validator

  Sources   Download

MIT

The Requires

 

by Lax Corp

inn kpp inn kpp validation bundle

21/12 2017

v1.0.3

1.0.3.0 https://github.com/LaxCorp/InnKppBundle

Symfony Inn Kpp ORM Entity validator

  Sources   Download

MIT

The Requires

 

by Lax Corp

inn kpp inn kpp validation bundle

21/12 2017

v1.0.2

1.0.2.0 https://github.com/LaxCorp/InnKppBundle

Symfony Inn Kpp ORM Entity validator

  Sources   Download

MIT

The Requires

 

by Lax Corp

inn kpp inn kpp validation bundle

21/12 2017

v1.0.1

1.0.1.0 https://github.com/LaxCorp/InnKppBundle

Symfony Inn Kpp ORM Entity validator

  Sources   Download

MIT

The Requires

 

by Lax Corp

inn kpp inn kpp validation bundle

21/12 2017

v1.0.0

1.0.0.0 https://github.com/LaxCorp/InnKppBundle

Symfony Inn Kpp ORM Entity validator

  Sources   Download

MIT

The Requires

 

by Lax Corp

inn kpp inn kpp validation bundle