gollumsf/doctrine-arraypipe

An array pipe type for Doctrine MYSQL

v1.1.3 2022-05-20 21:56 UTC

This package is auto-updated.

Last update: 2022-11-20 22:58:45 UTC


README

An array pipe type for Doctrine MYSQL

Installation:

composer require gollumsf/doctrine-arraypipe

Configuration:

doctrine:
    dbal:
        types:
            array_pipe: GollumSF\Doctrine\ArrayPipe

Usage:

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Table()
 */
class Entity {
	
	/**
	 * @ORM\Column(type="array_pipe")
	 * @var int
	 */
	private $arrayPipe = [
		'ROLE_EXAMPLE', 'ROLE_USER', 'ROLE_ADMIN'
	];
	// Storage data in database with value: ROLE_EXAMPLE|ROLE_USER|ROLE_ADMIN
	
	
	/////////
	// ... //
	/////////
	
}