PHP code example of nkt / doctrine-columns
1. Go to this page and download the library: Download nkt/doctrine-columns 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/ */
nkt / doctrine-columns example snippets
use Nkt\Column;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="books")
*/
class Book
{
use Column\Id;
use Column\Name;
use Column\Description;
use Column\Price;
public function __construct($name, $description)
{
$this->setName($name);
$this->setDescription($description);
}
}