PHP code example of pfazzi / isbn-doctrine
1. Go to this page and download the library: Download pfazzi/isbn-doctrine 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/ */
pfazzi / isbn-doctrine example snippets
php
\Doctrine\DBAL\Types\Type::addType('isbn', 'Pfazzi\Isbn\Doctrine\IsbnType');
php
/**
* @ORM\Entity()
*/
class Book
{
/**
* @ORM\Id()
* @ORM\Column(type="isbn")
*
* @var Isbn
*/
private $isbn;
public function __construct(Isbn $isbn)
{
$this->isbn = $isbn;
}
public function getIsbn(): Isbn
{
return $this->isbn;
}
}