PHP code example of laxcorp / inn-kpp-bundle

1. Go to this page and download the library: Download laxcorp/inn-kpp-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

laxcorp / inn-kpp-bundle example snippets


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

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

....

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

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



namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use LaxCorp\InnKppBundle\Validator\Constraints\InnKppEntity;

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

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