PHP code example of gubler / color-doctrine
1. Go to this page and download the library: Download gubler/color-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/ */
gubler / color-doctrine example snippets
php
\Doctrine\DBAL\Types\Type::addType('color', 'Gubler\Color\Doctrine\ColorType');
php
#[Entity]
#[Table(name="label")]
class label
{
#[Column(type="color")]
private Color $color;
public function getColor(): \Gubler\Color\Color
{
return $this->color;
}
}