public function registerCustomDoctrineType($class, $name, $type)
    {
        if (! $this->connection->isDoctrineAvailable()) {
            throw new RuntimeException(
                'Registering a custom Doctrine type requires Doctrine DBAL (doctrine/dbal).'
            );
        }

        if (! Type::hasType($name)) {
            Type::addType($name, $class);

            $this->connection
                ->getDoctrineSchemaManager()
                ->getDatabasePlatform()
                ->registerDoctrineTypeMapping($type, $name);
        }
    }
public function registerCustomDoctrineType($class, $name, $type)
    {
        if (! $this->connection->isDoctrineAvailable()) {
            throw new RuntimeException(
                'Registering a custom Doctrine type requires Doctrine DBAL (doctrine/dbal).'
            );
        }

        if (! Type::hasType($name)) {
            Type::addType($name, $class);

            $this->connection
                ->getDoctrineSchemaManager()
                ->getDatabasePlatform()
                ->registerDoctrineTypeMapping($type, $name);
        }
    }
public function registerCustomDoctrineType ( $ class , $ name , $ type ) { if ( ! $ this -> connection -> isDoctrineAvailable ( ) ) { throw new RuntimeException ( 'Registering a custom Doctrine type requires Doctrine DBAL (doctrine/dbal).' ) ; } if ( ! Type :: hasType ( $ name ) ) { Type :: addType ( $ name , $ class ) ; $ this -> connection -> getDoctrineSchemaManager ( ) -> getDatabasePlatform ( ) -> registerDoctrineTypeMapping ( $ type , $ name ) ; } }
Register a custom Doctrine mapping type.

@param  string  $class
@param  string  $name
@param  string  $type
@return void

@throws \Doctrine\DBAL\DBALException
Register a custom Doctrine mapping type .